Query editor
WITH params AS (SELECTDATE '2024-01-01' AS start_date,DATE '2026-04-09' AS end_date),token_universe AS (SELECT *FROM (VALUES('USDT', 0xdac17f958d2ee523a2206206994597c13d831ec7),('USDC', 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48),('DAI', 0x6b175474e89094c44da98b954eedeac495271d0f),('FRAX', 0x853d955acef822db058eb8505911ed77f175b99e),('PYUSD', 0x6c3ea9036406852006290770bedfcaba0e23a0e8)) AS t(symbol, eth_token_address)),eth_side_flows AS (SELECTCAST(f.withdrawal_block_date AS DATE) AS day,t.symbol,'inflow' AS direction,f.bridge_name,f.deposit_chain AS peer_chain,f.amount_usdFROM bridges_evms.flows fCROSS JOIN params pJOIN token_universe tON f.withdrawal_token_address = t.eth_token_addressWHERE f.withdrawal_chain = 'ethereum'AND CAST(f.withdrawal_block_date AS DATE) >= p.start_dateAND CAST(f.withdrawal_block_date AS DATE) <= p.end_dateAND f.amount_usd IS NOT NULLUNION ALLSELECTCAST(f.deposit_block_date AS DATE) AS day,t.symbol,'outflow' AS direction,f.bridge_name,f.withdrawal_chain AS peer_chain,f.amount_usdFROM bridges_evms.flows fCROSS JOIN params pJOIN token_universe tON f.deposit_token_address = t.eth_token_addressWHERE f.deposit_chain = 'ethereum'AND CAST(f.deposit_block_date AS DATE) >= p.start_dateAND CAST(f.deposit_block_date AS DATE) <= p.end_dateAND f.amount_usd IS NOT NULL),daily_metrics AS (SELECTday,symbol,