Query editor
with pass1 as (selectt.tx_hash as hash,t.block_time,coalesce(a.app_code, 'Cowswap Integrators') as frontend,'Cowswap' as metaaggregator,coalesce(s.name, 'Unlabeled Solver') as solver,t.trader as user,t.token_pair as trade_pair,t.usd_value as trade_usdfrom cow_protocol_ethereum.trades tjoin cow_protocol_ethereum.batches b on t.tx_hash = b.tx_hashleft join cow_protocol_ethereum.solvers s on s.address = b.solver_addressleft join cow_protocol_ethereum.app_data a on a.app_hash = t.app_datawhere t.block_month >= date_trunc('month', now() - interval '7' day)and b.block_date >= now() - interval '7' day),-- ofaget_ofa as (selectone.*,casewhen hash in (select distinctfrom_hex(CAST(json_extract(transactions, '$[0].hash') AS VARCHAR)) as user_txfrommevblocker.raw_bundles)and hash in (selecttx_hashfromquery_3023136 -- Flashbots Protect Dataset) then 'Flashbots Protect & MEV Blocker'when hash in (select distinctfrom_hex(CAST(json_extract(transactions, '$[0].hash') AS VARCHAR)) as user_txfrommevblocker.raw_bundles) then 'MEV Blocker'when hash in (selecttx_hashfromquery_3023136 -- Flashbots Protect Dataset) then 'Flashbots Protect'else nullend as OFAfrom