Query editor
-- Stabletide A2: Top exchanges by 30-day CEX stablecoin flow (Ethereum)-- Source: cex.flows. Top 15 by gross volume (inflow+outflow); net = Inflow - Outflow.withagg as (selectcex_name,sum(case when flow_type = 'Inflow' then amount_usd else 0 end)as inflow_usd,sum(case when flow_type = 'Outflow' then amount_usd else 0 end)as outflow_usdfrom cex.flowswhereblockchain = 'ethereum'and block_month >= date_trunc('month', current_date - interval '30' day)and block_time >= current_date - interval '30' dayand token_address in (0xdac17f958d2ee523a2206206994597c13d831ec7,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)and flow_type in ('Inflow', 'Outflow')group by cex_name)selectcex_name,inflow_usd,outflow_usd,inflow_usd - outflow_usd as net_usd,inflow_usd + outflow_usd as gross_usdfrom aggorder by gross_usd desclimit 15