mlhUntitled Query
Updated 2022-09-18
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
›
⌄
select date_trunc('day', BLOCK_TIMESTAMP) AS date,
'Aave' as protocol,
sum(WITHDRAWN_TOKENS) AS ETH_withdraw_volume,
count(distinct DEPOSITOR_ADDRESS) AS distinct_withdrawer
from ethereum.aave.ez_withdraws
where SYMBOL like '%ETH%'
and date >= CURRENT_DATE- 90
group by 1, 2
UNION
select date_trunc('day', BLOCK_TIMESTAMP) AS date,
'Maker' as protocol,
sum(AMOUNT_WITHDRAWN) AS ETH_withdraw_volume,
count(DISTINCT WITHDRAWER) AS distinct_withdrawer
from ethereum.maker.ez_withdrawals
where SYMBOL='WETH'
and date >= CURRENT_DATE- 90
group by 1, 2
UNION
select date_trunc('day', BLOCK_TIMESTAMP) AS date,
'Compound' as protocol,
sum(RECEIVED_AMOUNT) AS ETH_withdraw_volume,
count(DISTINCT REDEEMER) AS distinct_withdrawer
from ethereum.compound.ez_redemptions
where RECEIVED_CONTRACT_SYMBOL='ETH'
and date >= CURRENT_DATE- 90
group by 1, 2
Run a query to Download Data