Query editor
WITH eth_first_deposit AS (SELECT"from" AS depositor,MIN(block_time) AS first_deposit_timeFROM tokens.transfersWHERE blockchain = 'ethereum'AND token_standard = 'native'AND to = 0x7dbb4bdcfe614398d1a68ecc219f15280d0959e0AND block_time >= TIMESTAMP '2023-01-09'GROUP BY 1),usdc_first_deposit AS (SELECT"from" AS depositor,MIN(block_time) AS first_deposit_timeFROM tokens.transfersWHERE blockchain = 'ethereum'AND token_standard = 'erc20'AND contract_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48AND to = 0x7dbb4bdcfe614398d1a68ecc219f15280d0959e0AND block_time >= TIMESTAMP '2025-04-14'GROUP BY 1),weekly_eth AS (SELECTdate_trunc('week', first_deposit_time) AS week,COUNT(*) AS new_eth_depositorsFROM eth_first_depositGROUP BY 1),weekly_usdc AS (SELECTdate_trunc('week', first_deposit_time) AS week,COUNT(*) AS new_usdc_depositorsFROM usdc_first_depositGROUP BY 1)SELECTCOALESCE(e.week, u.week) AS week,-- ETHCOALESCE(e.new_eth_depositors, 0) AS new_eth_depositors,SUM(COALESCE(e.new_eth_depositors, 0)) OVER (ORDER BY COALESCE(e.week, u.week)ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_eth_depositors,-- USDCCOALESCE(u.new_usdc_depositors, 0) AS new_usdc_depositors,SUM(COALESCE(u.new_usdc_depositors, 0)) OVER (ORDER BY COALESCE(e.week, u.week)ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_usdc_depositorsFROM weekly_eth eFULL OUTER JOIN weekly_usdc u