Query editor
withenriched_subset as (select*,casewhen ofa is null then 'No tx OFA'when ofa = 'Flashbots Protect & MEV Blocker' then 'FP & MB'else ofaend label,date_trunc('month', block_time) AS month_yearfrom dune.flashbots.result_overall_of_alltimewhereblock_time >= date('2023-11-01') andblock_time < date('2023-12-01')),all_trade_volume as (selectmonth_year,sum(trade_usd) trade_usdfrom enriched_subsetgroup by month_year)selectsub.*,sub.trade_usd / all_trade_volume.trade_usdfrom (selectmonth_year,label,sum(trade_usd) trade_usdfrom enriched_subsetgroup by month_year, label) subjoin all_trade_volumeon all_trade_volume.month_year = sub.month_year