chill1opaave19
Updated 2024-06-21
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
33
34
35
36
›
⌄
with borrows as (select count(*) as p1 , count(distinct borrower_address) as p2 , sum(borrowed_usd) as p3 from ethereum.aave.ez_borrows
where borrowed_usd < pow(10,15) and borrowed_usd is not null and year(block_timestamp) >= 2022
)
, deposits as (select count(*) as p1 , count(distinct depositor_address) as p2 , sum(supplied_usd) as p3 from ethereum.aave.ez_deposits
where supplied_usd < pow(10,15) and supplied_usd is not null and year(block_timestamp) >= 2022
)
,borrows_chart as (select count(*) as p1 , count(distinct borrower_address) as p2 , sum(borrowed_usd) as p3 , date_trunc('WEEK', block_timestamp) as d from ethereum.aave.ez_borrows
where borrowed_usd < pow(10,15) and borrowed_usd is not null and year(block_timestamp) >= 2022
group by d
)
, deposits_chart as (select count(*) as p1 , count(distinct depositor_address) as p2 , sum(supplied_usd) as p3 , date_trunc('WEEK', block_timestamp) as d from ethereum.aave.ez_deposits
where supplied_usd < pow(10,15) and supplied_usd is not null and year(block_timestamp) >= 2022
group by d
)
, borrows_tokens as (select count(*) as p1 ,count(distinct borrower_address) as p2 , sum(borrowed_usd) as p3 , symbol from ethereum.aave.ez_borrows
where borrowed_usd < pow(10,15) and borrowed_usd is not null and year(block_timestamp) >= 2022
group by 4
)
, borrows_tokens_chart as (select count(*) as p1 ,count(distinct borrower_address) as p2 , sum(borrowed_usd) as p3 , symbol , date_trunc('WEEK', block_timestamp) as d from ethereum.aave.ez_borrows
where borrowed_usd < pow(10,15) and borrowed_usd is not null and year(block_timestamp) >= 2022
group by 4 , 5
)
, deposits_tokens as (select count(*) as p1 ,count(distinct depositor_address) as p2 , sum(supplied_usd) as p3 , symbol from ethereum.aave.ez_deposits
where supplied_usd < pow(10,15) and supplied_usd is not null and year(block_timestamp) >= 2022
group by 4
)
, deposits_tokens_chart as (select count(*) as p1 ,count(distinct depositor_address) as p2 , sum(supplied_usd) as p3 , symbol, date_trunc('WEEK', block_timestamp) as d from ethereum.aave.ez_deposits
where supplied_usd < pow(10,15) and supplied_usd is not null and year(block_timestamp) >= 2022
group by 4 , 5
)
, borrows_count_top10 as (select count(*) as p1 , borrower_address from ethereum.aave.ez_borrows
where borrowed_usd < pow(10,15) and borrowed_usd is not null and year(block_timestamp) >= 2022
group by 2
QueryRunArchived: QueryRun has been archived