permarydead-red
Updated 2024-10-10
999
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
›
⌄
--aave deposits
with
aave_deposits as (
select
date_trunc('day',block_timestamp) as date,
'aave' as protocol,
sum(supplied_usd) as total_deposits
from ethereum.aave.ez_deposits
where block_timestamp >= current_date - interval '3 months'
group by date
),
--aave borrows
aave_borrows as (
select
date_trunc('day',block_timestamp) as date,
'aave' as protocol,
sum(borrowed_usd) as total_borrows
from ethereum.aave.ez_borrows
where block_timestamp >= current_date - interval '3 months'
group by date
),
--aave repayments
aave_repayments as (
select
date_trunc('day',block_timestamp) as date,
'aave' as protocol,
sum(repayed_usd) as total_repayments,
from ethereum.aave.ez_repayments
where block_timestamp >= current_date - interval '3 months'
group by date
),
-- aave withdrawals
aave_withdrawals as (
QueryRunArchived: QueryRun has been archived