Query editor
-- 07 · Who trades these markets? Polymarket only (Kalshi has no trader IDs)-- Unique takers, notional volume, and how concentrated it is in the top 10 wallets, per sub-theme.-- Reads the classifier: https://dune.com/queries/9226505with mk as (select theme, sub_theme, market_idfrom query_9226505where venue = 'polymarket'and not looks_like_price_market),by_trader as (selectmk.theme, mk.sub_theme, t.trader_address,sum(t.num_contracts) as volume_notional_usd,sum(t.amount_usd) as volume_cash_usd,count(*) as tradesfrom prediction_markets.trades tjoin mk on mk.market_id = t.market_idwhere t.venue = 'polymarket'and t.block_month >= date '2022-01-01'group by 1, 2, 3),ranked as (select *, row_number() over (partition by sub_theme order by volume_notional_usd desc) as rnfrom by_trader)selecttheme, sub_theme,count(*) as unique_takers,sum(volume_notional_usd) as volume_notional_usd,sum(volume_cash_usd) as volume_cash_usd,sum(trades) as trades,sum(volume_notional_usd) filter (where rn <= 10) / sum(volume_notional_usd) as top10_share_of_notional,sum(volume_notional_usd) filter (where rn = 1) / sum(volume_notional_usd) as top1_share_of_notional,approx_percentile(volume_notional_usd, 0.5) as median_notional_per_taker_usdfrom rankedgroup by 1, 2order by volume_notional_usd desc