Query editor
WITH topup AS (SELECT date_trunc('month', evt_block_time) as month, SUM(CAST(amount AS DOUBLE) / 1e6) as topup_usd, COUNT(*) as txns, COUNT(DISTINCT "user") as users FROM etherfi_scroll.topupdest_evt_topup WHERE token = 0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4 AND evt_block_time >= TIMESTAMP '2026-01-01' GROUP BY 1), cashback AS (SELECT date_trunc('month', evt_block_time) as month, SUM(CAST(spendingInUsd AS DOUBLE) / 1e6) as spend_usd, SUM(CAST(cashbackInUsd AS DOUBLE) / 1e6) as cashback_usd FROM etherfi_scroll.usersafeeventemitterv3_evt_cashback WHERE evt_block_time >= TIMESTAMP '2026-01-01' GROUP BY 1) SELECT COALESCE(t.month, c.month) as month, t.topup_usd, t.txns, t.users, c.spend_usd, c.cashback_usd FROM topup t FULL OUTER JOIN cashback c ON t.month = c.month ORDER BY 1