Query editor
WITH trump_market_trades AS (SELECTtaker,action,token_outcome,amount,price,block_time,CASEWHEN taker IN (0xc5d563a36ae78145c45a50134d48a1215220f80a,0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e) THEN 'Mega Whale'ELSE 'Other'END as trader_typeFROM polymarket_polygon.market_tradesWHERE question = 'Will Donald Trump win the 2024 US Presidential Election?'),volume_by_type AS (SELECTtrader_type,COUNT(*) as trade_count,COUNT(DISTINCT taker) as unique_traders,SUM(amount) as total_volume,AVG(amount) as avg_trade_sizeFROM trump_market_tradesGROUP BY trader_type)SELECTtrader_type,trade_count,unique_traders,total_volume,avg_trade_size,total_volume / (SELECT SUM(total_volume) FROM volume_by_type) * 100 as pct_of_market_volumeFROM volume_by_typeORDER BY total_volume DESC