Query editor
with uniswap_rfq as (SELECTf.evt_tx_hash, date_trunc('day', f.evt_block_time) as 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_hashleft join (select symbol, decimals, contract_address, blockchain from tokens.erc20 where blockchain='ethereum') as tk on tk.contract_address = tt.contract_addressleft join (select minute, decimals, contract_address, price from prices.usdwhere blockchain='ethereum' )as p on p.contract_address = tt.contract_address and p.minute = date_trunc('minute', f.evt_block_time)where function_name = 'fillOrderRFQ'and evt_block_time >= date(timestamp '{{1. startdate}}')), unique_uniswap_rfq as (selectdistinct(evt_tx_hash), date_trunc('day', evt_block_time) as time, case when true then 'UniswapX' end as protocol, case when true then 'UniswapX' end as project, blockchain, amount_usdfrom uniswap_rfq), stat as (selectupper(blockchain) as blockchain, time, sum(amount_usd) as volumefrom unique_uniswap_rfqgroup by 1, 2)select * from statorder by time desc, blockchain