Query editor
with raw as (select distinct hash,block_time,user,frontend,metaaggregator,solver,trade_pair,trade_usd-- from query_3152823from dune.flashbots.result_liquidity_version_orderflow_sankey_alltimeunion allselect distinctt.tx_hash,t.block_time,t.trader as user,coalesce(a.app_code, 'Cowswap Integrators') as frontend,'Cowswap' as metaaggregator,coalesce(s.name, 'Unlabeled Solver') as solver,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('2021-06-01')and b.block_date >= date('2021-06-08')--- cowswap has batch so user's trade pair cannot be mergedunion allselect distinct hash,block_time,user,frontend,metaaggregator,solver,trade_pair,trade_usdfrom dune.flashbots.result_alltime_uniswap_x_sankey_liquidity_viewunion allselect distincttx_hash as hash,block_time,user,'1inch Website: Default' as frontend,'1inch Fusion' as metaaggregator,coalesce(resolver_name, 'UNREGISTERED') as solver,CASEWHEN src_token_symbol < dst_token_symbol THEN src_token_symbol || '-' || dst_token_symbolELSE dst_token_symbol || '-' || src_token_symbolEND as trade_pair,amount_usd as trade_usdfrom oneinch.swaps sleft join oneinch.fusion_accounts f on f.address = s.tx_fromwhere