Query editor
WITH params AS (SELECTTIMESTAMP '2026-07-01 00:00:00' AS start_time,CAST(current_timestamp AT TIME ZONE 'UTC' AS timestamp) AS now_time,DATE_TRUNC('hour',CAST(current_timestamp AT TIME ZONE 'UTC' AS timestamp)) AS current_hour),-- Creates every hour from July 1 through the current UTC hour.-- This ensures that the current hour appears even if it has zero trades.hours AS (SELECT hourFROM params pCROSS JOIN UNNEST(SEQUENCE(p.start_time,p.current_hour,INTERVAL '1' HOUR)) AS t(hour)),pons_tokens AS (SELECT DISTINCTaddress AS token_addressFROM robinhood.creation_tracesWHERE "from" IN (0xa5aab3f0c6eeadf30ef1d3eb997108e976351feb,0x0c37a24f5d23a486fa692d1500881d698b1f77a4)AND block_time >= (SELECT start_time FROM params)AND block_time <= (SELECT now_time FROM params)),pons_pools AS (SELECT DISTINCTvarbinary_substring(l.data, 45, 20) AS pool,varbinary_substring(l.topic1, 13, 20) AS token0FROM robinhood.logs lWHERE l.topic0 =0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118AND l.block_date >= DATE '2026-07-01'AND l.block_time >= (SELECT start_time FROM params)AND l.block_time <= (SELECT now_time FROM params)AND ((varbinary_substring(l.topic1, 13, 20) =0x0bd7d308f8e1639fab988df18a8011f41eacad73AND varbinary_substring(l.topic2, 13, 20) IN (SELECT token_addressFROM pons_tokens))OR(varbinary_substring(l.topic2, 13, 20) =0x0bd7d308f8e1639fab988df18a8011f41eacad73AND varbinary_substring(l.topic1, 13, 20) IN (