permarycomparative analysis of different defi protocol volume
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
'aave' as protocol,
sum(supplied_usd) as total_deposits
from ethereum.aave.ez_deposits
where block_timestamp >= current_date - interval '3 months'
),
--aave borrows
aave_borrows as (
select
'aave' as protocol,
sum(borrowed_usd) as total_borrows
from ethereum.aave.ez_borrows
where block_timestamp >= current_date - interval '3 months'
),
--aave repayments
aave_repayments as (
select
'aave' as protocol,
sum(repayed_usd) as total_repayments,
from ethereum.aave.ez_repayments
where block_timestamp >= current_date - interval '3 months'
),
-- aave withdrawals
aave_withdrawals as (
select
'aave' as protocol,
sum(withdrawn_usd) as total_withdrawals
from ethereum.aave.ez_withdraws
where block_timestamp >= current_date - interval '3 months'
),
QueryRunArchived: QueryRun has been archived