Query editor
with r_dai_pool as (select sum(amount_swap_r /1e18) as swap_volume, count(distinct tx_hash) as swap_count, dtfrom (select tx_hash, date_trunc('day', block_time) as dt,case when topic2 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,1,32))when topic3 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,33,32))end as amount_swap_rfrom ethereum.logswhere topic0 = 0x2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207band topic1 = 0x20A61B948E33879CE7F23E535CC7BAA3BC66C5A9000000000000000000000555)group by 3),r_bb_dai_pool as (select sum(amount_swap_r /1e18) as swap_volume, count(distinct tx_hash) as swap_count, dtfrom (select tx_hash, date_trunc('day', block_time) as dt,case when topic2 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,1,32))when topic3 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,33,32))end as amount_swap_rfrom ethereum.logswhere topic0 = 0x2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207band topic1 = 0xBF2EF8BDC2FC0F3203B3A01778E3EC5009AEEF3300000000000000000000058D)group by 3),r_wsteth_pool as (select sum(amount_swap_r /1e18) as swap_volume, count(distinct tx_hash) as swap_count, dtfrom (select tx_hash, date_trunc('day', block_time) as dt,case when topic2 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,1,32))when topic3 = 0x000000000000000000000000183015a9ba6ff60230fdeadc3f43b3d788b13e21 then bytearray_to_uint256(bytearray_substring(data,33,32))end as amount_swap_rfrom ethereum.logswhere topic0 = 0x2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207band topic1 = 0x380aabe019ed2a9c2d632b51eddd30fd804d0fad000200000000000000000554)group by 3),r_volume_uniswap as (select sum(amount_usd) as swap_volume, date_trunc('day', block_time) as dtfrom dex.tradeswhere token_bought_address = 0x183015a9bA6fF60230fdEaDc3F43b3D788b13e21or token_sold_address = 0x183015a9bA6fF60230fdEaDc3F43b3D788b13e21and project = 'uniswap'group by 2),r_wsteth_volume_maverick as (select sum(amount_usd) as swap_volume, date_trunc('day', block_time) as dtfrom dex.tradeswhere project_contract_address = 0x96BfB2729486EA32570891ed5EaD71D2Ec380f62group by 2),r_weth_volume_maverick as (select sum(amount_usd) as swap_volume, date_trunc('day', block_time) as dt