maybeyonasUniswap v2 vs v3 difference
Updated 2021-09-12
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- select * from ethereum.dex_swaps -- may 10, jun 8 , jul 29 , sep 10
-- where platform = 'uniswap-v2'
-- and date(block_timestamp) = date_from_parts(2021,09,10) and amount_usd is not null
-- order by amount_usd desc
-- limit 100
with swaps as(
select
block_timestamp,
tx_id,
platform,
amount_usd as swap_vol
from ethereum.dex_swaps
where platform in ('uniswap-v2','uniswap-v3') and direction ='OUT'
and pool_name not in ('SYFI-WETH LP','UNL-WETH LP','WETH-HACHIKO LP','YUAN-USDX LP','YUAN-WETH LP','CYFM-WETH LP')
),
daily as(
select
date(block_timestamp) as date,
platform,
sum(swap_vol) as swap_vol
from swaps
group by date(block_timestamp), platform
),
v2 as(
select *
from daily
where date > date_from_parts(2021,05,05) and platform = 'uniswap-v2'
),
v3 as(
select *
from daily
where date > date_from_parts(2021,05,05) and platform = 'uniswap-v3'
)
Run a query to Download Data