Query editor
WITH all_transfers AS (SELECTDATE_TRUNC('day', block_time) as day,"from","to",amount_usdFROM tokens.transfersWHERE blockchain = 'sei'AND symbol = 'SEI'AND block_time >= CURRENT_DATE - INTERVAL '30' day),whale_transfers AS (SELECTday,"from","to",amount_usdFROM all_transfersWHERE amount_usd >= 100000),total_daily_volume AS (SELECTday,SUM(amount_usd) as total_volumeFROM all_transfersGROUP BY day),whale_daily_volume AS (SELECTday,SUM(amount_usd) as whale_volume,COUNT(DISTINCT "from") as active_whale_senders,COUNT(DISTINCT "to") as active_whale_receiversFROM whale_transfersGROUP BY day)SELECTt.day,t.total_volume,COALESCE(w.whale_volume, 0) as whale_volume,COALESCE(w.whale_volume, 0) / NULLIF(t.total_volume, 0) * 100 as whale_share_pct,COALESCE(w.active_whale_senders, 0) + COALESCE(w.active_whale_receivers, 0) as active_whalesFROM total_daily_volume tLEFT JOIN whale_daily_volume w ON t.day = w.dayORDER BY t.day DESC