Josh956net uniswap
Updated 2022-11-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with a as(select date_trunc('day', block_timestamp) as aday, sum(amount1_adjusted)/power(10,6) as amount_swapped_out
from ethereum.uniswapv3.ez_swaps
where TOKEN1_SYMBOL like '%ETH%'
and block_timestamp>='2022-09-15'
group by 1),
b as (select date_trunc('day', block_timestamp) as day, sum(amount0_adjusted)*-1 as amount_swapped_in
from ethereum.uniswapv3.ez_swaps
where TOKEN0_SYMBOL like '%ETH%'
and block_timestamp>='2022-09-15'
group by 1
)
select day, sum(amount_swapped_in-amount_swapped_out)
from a
inner join b on aday=day
group by 1
Run a query to Download Data