shibidiloUntitled Query
Updated 2022-09-26Copy Reference Fork
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
›
⌄
with base as (
select date(block_timestamp) as day,
tx_hash,
case
when token0_symbol = 'WETH' then amount0_usd
when token1_symbol = 'WETH' then amount1_usd
end as WETH_USD_deposited,
case
when token0_symbol = 'WETH' then amount0_adjusted
when token1_symbol = 'WETH' then amount1_adjusted
end as WETH_deposited
from ethereum.uniswapv3.ez_lp_actions
where (token0_symbol = 'WETH' or token1_symbol = 'WETH')
and action = 'INCREASE_LIQUIDITY'
and day >= '2022-07-01'),
base2 as (
select
date(block_timestamp) as day,
tx_hash,
case
when token0_symbol = 'WETH' then amount0_usd
when token1_symbol = 'WETH' then amount1_usd
end as WETH_USD_withdrawn,
case
when token0_symbol = 'WETH' then amount0_adjusted
when token1_symbol = 'WETH' then amount1_adjusted
end as WETH_withdrawn
from ethereum.uniswapv3.ez_lp_actions
where (token0_symbol = 'WETH' or token1_symbol = 'WETH')
and action = 'DECREASE_LIQUIDITY'
and day >= '2022-07-01'),
base3 as (
select day,
sum(WETH_USD_withdrawn) as WETH_USD_withdrawn,
Run a query to Download Data