adambalaMonthly Swap Volume
Updated 2021-11-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
with mainrp as (
select 'uniswap' Title,dv.monthno,dv.name monthname,sum(dv.amount_usd)Volume from (
select month (block_timestamp)monthno,monthname (block_timestamp)name,amount_usd from ethereum.dex_swaps
where platform IN ('uniswap-v2','uniswap-v3')
AND block_timestamp::date > current_date-365
)dv group by dv.monthno,dv.name
union ALL
select 'sushiswap' Title,dv.monthno,dv.name monthname,sum(dv.amount_usd)Volume from (
select month (block_timestamp)monthno,monthname (block_timestamp)name,amount_usd from ethereum.dex_swaps
where platform IN ('sushiswap')
AND block_timestamp::date > current_date-365
)dv group by dv.monthno,dv.name
)
select * from mainrp order by monthno