Query editor
-- Fast chart source: validated counts from full-cohort P&L calculations.-- Overall includes every January entrant; P&L is measured through July 31 for every group.WITH counts AS (SELECT venue, segment, trader_group,TRY_CAST(group_order AS integer) AS group_order,TRY_CAST(group_wallets AS double) AS group_wallets,TRY_CAST(pnl_computed_wallets AS double) AS pnl_computed_wallets,TRY_CAST(pnl_eligible_wallets AS double) AS pnl_eligible_wallets,TRY_CAST(profitable_wallets AS double) AS profitable_wallets,TRY_CAST(loss_wallets AS double) AS loss_wallets,TRY_CAST(flat_wallets AS double) AS flat_wallets,TRY_CAST(unpriced_wallets AS double) AS unpriced_wallets,TRY_CAST(potentially_profitable_wallets AS double) AS potentially_profitable_walletsFROM dune.defiance_cr.dataset_trader_retention_profit_groups_20260905)SELECT *,100.0 * profitable_wallets / nullif(pnl_eligible_wallets, 0) AS estimated_profitable_pct,100.0 * pnl_eligible_wallets / nullif(group_wallets, 0) AS pnl_basis_coverage_pct,100.0 * unpriced_wallets / nullif(pnl_eligible_wallets, 0) AS unpriced_holdings_pct,100.0 * profitable_wallets / nullif(group_wallets, 0) AS known_profitable_pct_all_wallets,100.0 * potentially_profitable_wallets / nullif(pnl_eligible_wallets, 0) AS unpriced_profit_upper_bound_pctFROM countsORDER BY segment, group_order, venue