Query editor
-- Deliverable 5: trades/day per bot, median across the cohort.-- Cohort = wallets with median per-trade capital 0.2-3 SOL and >=20 arbs/7d.WITH pw AS (SELECT trader_id, count(*) AS n, approx_percentile(capital_sol,0.5) AS medFROM query_8082917GROUP BY trader_id)SELECTcount(*) AS n_cohort_wallets,approx_percentile(n/7.0, 0.5) AS median_arbs_per_day,approx_percentile(n/7.0, 0.25) AS p25_arbs_per_day,approx_percentile(n/7.0, 0.75) AS p75_arbs_per_day,approx_percentile(n/7.0, 0.9) AS p90_arbs_per_dayFROM pwWHERE med BETWEEN 0.2 AND 3 AND n >= 20