Query editor
withL as (select * from dune.fadz2323.result_base_liq_open_race_events where t < timestamp '2026-12-04' and b >= 53664122 and not is_atlas),S as (select * from dune.fadz2323.result_base_liq_open_race_svr),X as (select * from dune.fadz2323.result_base_liq_open_race_txs),e as (select L.bonus_usd, coalesce(X.tx_type, '?') tx_type,casewhen (S.last_atlas_ts is not null and L.ts - S.last_atlas_ts <= 10) or (S.last_s_ts is not null and L.ts - S.last_s_ts <= 10) then 'leftover'when S.lag_fb_mapped is not null or (S.svr_agg is null and S.lag_fb_any <= 3) then 'fallback'when S.nonsvr_hit >= 0 then 'non_svr'else 'drift' end cls,case when S.last_atlas_b = L.b or (S.lag_fb_mapped < 0.2) then 1 else 0 end same_blkfrom L join S on S.tx = L.tx and S.ei = L.ei left join X on X.tx = L.tx)select cls, tx_type, count(*) n, round(sum(bonus_usd)) bonus, round(avg(same_blk),2) same_blk_sharefrom e group by 1,2 order by 1, 3 desc