cyphereth removed from aave
Updated 2022-09-17
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
›
⌄
with eth_deposited as (select * from ethereum.aave.ez_deposits
where contains(symbol, 'ETH')),
daily_eth_deposited as (select
date_trunc('day', block_timestamp) as day,
sum(issued_tokens) as eth_amount_deposited,
sum(supplied_usd) as usd_amount
from eth_deposited
where day >= current_date() - 30
group by day),
eth_withdrawn as (select * from ethereum.aave.ez_withdraws
where contains(symbol, 'ETH')),
daily_eth_withdrawn as (select
date_trunc('day', block_timestamp) as day,
sum(withdrawn_tokens) as eth_amount_withdrawn,
sum(withdrawn_usd) as usd_amount
from eth_withdrawn
where day >= current_date() - 30
group by day),
net_deposited as (
select d.day, d.eth_amount_deposited, w.eth_amount_withdrawn, d.eth_amount_deposited-w.eth_amount_withdrawn as net_deposited
from daily_eth_deposited d, daily_eth_withdrawn w
where d.day = w.day
)
select * from net_deposited
Run a query to Download Data