Soheil_MKUntitled Query
Updated 2022-09-14
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
›
⌄
with deposit as (
select
BLOCK_TIMESTAMP::date as date,
sum(amount_deposited) as ETH_amounts,
sum(ETH_amounts) over (order by date) as cum_ETH_amounts
from ethereum.maker.ez_deposits
where symbol = 'WETH'
and date >= '2022-01-01'
group by 1
),
withdraw as (
select
BLOCK_TIMESTAMP::date as date,
sum(AMOUNT_WITHDRAWN) as ETH_amounts,
sum(ETH_amounts) over (order by date) as cum_ETH_amounts
from ethereum.maker.ez_withdrawals
where symbol = 'WETH'
and date >= '2022-01-01'
group by 1
)
select
a.date,
a.ETH_amounts as deposited_ETH,
-b.ETH_amounts as withdrawn_ETH,
sum(a.ETH_amounts-b.ETH_amounts) over (order by a.date) as cum_total
from deposit a
join withdraw b
on a.date=b.date
where a.date>='2022-07-01'
Run a query to Download Data