Query editor
with-- get transaction hashes with entry point cowswappass0 as (selecttx.hash,tx.block_time,'Cowswap Integrators' as frontend,'Cowswap' as metaaggregator,coalesce(solvers.name, 'Unlabeled Solver') as solverfromethereum.transactions txleft join query_5756255 solvers on tx."from" = prod_addresswheretx."to" = 0x9008D19f58AAbD9eD0D60971565AA8510560ab41and tx.block_time > now() - interval '7' day),pass1 as (selectzero.*,sum(amount_usd) as trade_usdfrompass0 zerojoin dex_aggregator.trades da on zero.hash = da.tx_hashwhereda.blockchain = 'ethereum'and da.project = 'cow_protocol'group by1,2,3,4,5),-- liquidity src for solver-type fillersliquidity as (-- if tx hash is in dex.trades, solver sourced dex liquidityselectone.*,null as aggregator,casewhen dt.project ='uniswap' then concat('Uniswap V', dt.version)when dt.project = '0x API' and maker is not null then null -- 0x API logs PMM trades in dex.tradeswhen dt.project = '1inch LOP' then '1inch Limit Orders'else CONCAT(UPPER(SUBSTRING(dt.project, 1, 1)),SUBSTRING(dt.projectFROM2))end as liquidity_src,case when dt.project = '0x API' then coalesce(mm.name || ' PMM', 'Other PMM') else null end as pmm, -- will cover SCP casedt.token_pair as token_pair,dt.amount_usd,dt.version as dt_versionfrompass1 onejoin dex.trades dt on (one.hash = dt.tx_hash)left join query_2812729 mm on mm.address = dt.maker