barbodTotal AAVE Supplied
Updated 2022-11-12
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 supply as (
SELECT
--- date_trunc('day',block_timestamp) as date,
sum(ISSUED_TOKENS) as supply_tokens,
sum(SUPPLIED_USD) as supply_usd
from aave.deposits
where SYMBOL='AAVE'
and block_timestamp>=CURRENT_DATE-180
---group by 1
),
withdrawal as(
SELECT
---date_trunc('day',block_timestamp) as date,
sum(WITHDRAWN_TOKENS) as withdrawal_tokens,
sum(WITHDRAWN_USD) as withdrawal_usd
from aave.withdraws
where SYMBOL='AAVE'
and block_timestamp>=CURRENT_DATE-180
--group by 1
)
SELECT
--supply.date,
supply_tokens as aave_supplied,
withdrawal_tokens as aave_withdrawled,
supply_usd,
withdrawal_usd
from supply
-- left
join withdrawal
--on supply.date=withdrawal.date
Run a query to Download Data