Query editor
-- Top 100 Soccer Traders by PnL (2026)-- Methodology: Realized cashflow-based PnL for markets tagged as soccer.WITH soccer_markets AS (SELECT DISTINCT condition_idFROM polymarket_polygon.market_detailsWHERE LOWER(tags) LIKE '%soccer%'OR LOWER(tags) LIKE '%premier league%'OR LOWER(tags) LIKE '%football%'OR LOWER(tags) LIKE '%la liga%'OR LOWER(tags) LIKE '%serie a%'OR LOWER(tags) LIKE '%bundesliga%'OR LOWER(tags) LIKE '%fifa world cup%'OR LOWER(tags) LIKE '%ucl%'OR LOWER(tags) LIKE '%uel%'OR LOWER(tags) LIKE '%copa america%'OR LOWER(tags) LIKE '%ligue 1%'OR LOWER(tags) LIKE '%eredivisie%'),raw_cashflows AS (-- BUY / SELL Trades-- Each trade appears twice (maker and taker). We extract both sides into a single stream.SELECTmt.maker AS address,mt.condition_id,CASE WHEN mt.maker_side = 'SELL' THEN mt.amount - mt.fee ELSE -mt.amount END AS cashflow,mt.amount AS volumeFROM polymarket_polygon.market_trades mtINNER JOIN soccer_markets sm ON CAST(mt.condition_id AS VARCHAR) = sm.condition_idWHERE mt.block_month >= DATE '2026-01-01'AND mt.maker != mt.taker -- Exclude self-tradesUNION ALLSELECTmt.taker AS address,mt.condition_id,CASE WHEN mt.taker_side = 'SELL' THEN mt.amount - mt.fee ELSE -mt.amount END AS cashflow,mt.amount AS volumeFROM polymarket_polygon.market_trades mtINNER JOIN soccer_markets sm ON CAST(mt.condition_id AS VARCHAR) = sm.condition_idWHERE mt.block_month >= DATE '2026-01-01'AND mt.maker != mt.takerUNION ALL-- REDEEM (Payouts)SELECTCASE WHEN pr.redeemer = 0xd91e80cf2e7be2e162c6513ced06f1dd0da35296 THEN pr.evt_tx_from ELSE pr.redeemer END AS address,pr.conditionId AS condition_id,CAST(pr.payout AS double) / 1e6 AS cashflow,0 AS volumeFROM polymarket_polygon.ctf_evt_payoutredemption prINNER JOIN soccer_markets sm ON CAST(pr.conditionId AS VARCHAR) = sm.condition_idWHERE pr.evt_block_date >= DATE '2026-01-01'UNION ALL-- SPLIT (Outflow)