Updated 2022-08-09
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
›
⌄
with tab1 AS
(select
BLOCK_TIMESTAMP::date as day,
median(SUPPLIED_USD ) as wbtc_supply
from flipside_prod_db.aave.deposits
where AAVE_VERSION = 'Aave V2'
and SYMBOL = 'WBTC'
group by 1),
tab2 as(
select
BLOCK_TIMESTAMP::date as days,
sum(BORROWED_USD ) as usdc_borrows
from flipside_prod_db.aave.borrows
where AAVE_VERSION = 'Aave V2'
and SYMBOL = 'USDC'
group by 1
)
SELECT
wbtc_supply,
usdc_borrows,
day
from tab1
join tab2 on tab1.day = tab2.days
Run a query to Download Data