Query editor
-- One row per hour: Robinhood DEX volume, traders, ERC-20 launches, Pons graduations, new pairs.WITH bounds AS (SELECTdate_trunc('hour', now()) - INTERVAL '{{days}}' DAY AS start_ts,date_trunc('hour', now()) AS end_ts),quotes AS (SELECT addr FROM (VALUES(0x0bd7d308f8e1639fab988df18a8011f41eacad73),(0x5fc5360d0400a0fd4f2af552add042d716f1d168),(0x0000000000000000000000000000000000000000)) AS t(addr)),trades AS (SELECTdate_trunc('hour', t.block_time) AS hour,t.amount_usd,t.tx_from,CASEWHEN t.token_bought_address NOT IN (SELECT addr FROM quotes) THEN t.token_bought_addressWHEN t.token_sold_address NOT IN (SELECT addr FROM quotes) THEN t.token_sold_addressELSE NULLEND AS memeFROM dex.trades tCROSS JOIN bounds bWHERE t.blockchain = 'robinhood'AND t.block_time >= b.start_tsAND t.block_time < b.end_tsAND t.block_month >= date_trunc('month', b.start_ts)),market AS (SELECT hour, SUM(amount_usd) AS volume_usd, COUNT(*) AS trades, COUNT(DISTINCT tx_from) AS tradersFROM tradesGROUP BY 1),launches AS (SELECT date_trunc('hour', l.block_time) AS hour, COUNT(DISTINCT l.contract_address) AS launchesFROM robinhood.logs lCROSS JOIN bounds bWHERE l.block_time >= b.start_ts AND l.block_time < b.end_tsAND l.block_date >= date(b.start_ts)AND l.topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efAND l.topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000AND l.topic3 IS NULLGROUP BY 1),migrations AS (SELECT date_trunc('hour', l.block_time) AS hour, COUNT(*) AS migrationsFROM robinhood.logs lCROSS JOIN bounds bWHERE l.block_time >= b.start_ts AND l.block_time < b.end_tsAND l.block_date >= date(b.start_ts)AND l.contract_address = 0x7ed598bcef8bd9edd8c97a195c6d13f40801ec7eAND l.topic0 = 0x308c390ed1ab5873392818e036cabdf408bc8ad042fbaead3108954ff75ba980GROUP BY 1),new_pairs AS (SELECT first_hour AS hour, COUNT(*) AS new_pairs, SUM(first_vol) AS new_pair_volume_usd