Query editor
-- Report Card · Ceiling tie-in summary for {{wallet_address}}: mean capture, total regret, and the one vote-change that closes the most gap.WITH base AS (SELECT e, rpv, veaero FROM query_7907454 WHERE is_partial=false AND lower(cast(wallet as varchar))=lower('{{wallet_address}}')),ceil AS (SELECT e, epoch_label, ceiling1_rpv, ceiling1_pool FROM query_7918367),j AS (SELECT b.e, ci.epoch_label, ci.ceiling1_pool,b.rpv/NULLIF(ci.ceiling1_rpv,0) cap,GREATEST(ci.ceiling1_rpv-b.rpv,0)*b.veaero regretFROM base b JOIN ceil ci ON ci.e=b.e)SELECTround(avg(cap)*100,1) mean_capture_pct,round(sum(regret),0) total_regret_usd,max_by(epoch_label, regret) biggest_miss_epoch,max_by(ceiling1_pool, regret) biggest_miss_pool,round(max(regret),0) biggest_miss_regret_usd,count(*) epochs_measuredFROM j