Query editor
-- 1Inch Ethereumwith inch_eth as(selectdate_trunc('day', block_time) as time, case when true then '1inch' end as protocol, project, blockchain, token_sold_symbol, token_sold_amount, token_bought_symbol, token_bought_amount, amount_usdfrom dex_aggregator.tradeswhere project like '%1inch%'and lower(version) like '%rfq%'and blockchain = 'ethereum'and block_date >= date(timestamp '{{1. startdate}}'))-- Cowswap Ethereum, cowswap_eth as (SELECTdate_trunc('day', c.block_time) as time, case when true then 'CoW Swap' end as protocol, case when true then 'CoW Swap' end as project, case when true THEN 'ethereum' end as blockchain, c.sell_token as token_sold_symbol, c.units_sold as token_sold_amount, c.buy_token as token_bought_symbol, c.units_bought as token_bought_amount, c.usd_value as amount_usd, trace.function_nameFROM cow_protocol_ethereum.trades cleft join (select tx_hash, function_name from ethereum.traces_decoded where block_time >= date(timestamp '{{1. startdate}}') and lower(function_name) like '%rfq%') as trace on c.tx_hash = trace.tx_hashWHERE block_date >= date(timestamp '{{1. startdate}}')and lower(function_name) like '%rfq%'), uniswap_rfq as (SELECTf.evt_tx_hash, date_trunc('day', f.evt_block_time) as block_time, f.evt_block_time, p.minute, f.filler, f.swapper, get_href(get_chain_explorer_tx_hash('ethereum', cast(tt.evt_tx_hash as varchar)), cast(tt.evt_tx_hash as varchar)) as tx_hash, cast(value as double) / pow(10, COALESCE(tk.decimals, 18)) as token_value, p.price, cast(value as double) / pow(10, COALESCE(tk.decimals, 18)) * p.price as amount_usd, tt.contract_address as contract_address, tk.symbol as symbol, tk.blockchain as blockchainFROM uniswap_ethereum.ExclusiveDutchOrderReactor_evt_Fill AS fleft join (select tx_hash, function_name from ethereum.traces_decoded where block_time >= date(timestamp '{{1. startdate}}')) as trace on f.evt_tx_hash = trace.tx_hashleft join (select contract_address, evt_tx_hash, "from", to, value from erc20_ethereum.evt_Transfer where evt_block_time >= date(timestamp '{{1. startdate}}')) as tt on f.evt_tx_hash = tt.evt_tx_hash