MasiTotal
Updated 2023-06-25
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 tb1 as ( select trunc(block_timestamp,'{{Time}}') as date,
depositor_address,
count(DISTINCT tx_hash) as count_txs,
sum(supplied_usd) as usd_volume,
avg(supplied_usd) as avg_volume
from ethereum.aave.ez_deposits
where symbol = 'AAVE'
and block_timestamp::date >= current_date - 365
group by 1,2)
,
tb2 as ( select
'Supply' as status,
count(DISTINCT depositor_address) as count_users,
sum(count_txs) as count_tx,
avg(count_txs) as avg_tx_per_user,
sum(usd_volume) as volume_usd,
avg(usd_volume) as avg_volume_per_user
from tb1
group by 1)
,
tb3 as ( select trunc(block_timestamp,'{{Time}}') as date,
depositor_address,
count(DISTINCT tx_hash) as count_txs,
sum(WITHDRAWN_USD) as usd_volume,
avg(WITHDRAWN_USD) as avg_volume
from ethereum.aave.ez_withdraws
where symbol = 'AAVE'
and block_timestamp::date >= current_date - 365
group by 1,2)
,
tb4 as ( select
'Withdraw' as status,
count(DISTINCT depositor_address) as count_users,
sum(count_txs) as count_tx,
avg(count_txs) as avg_tx_per_user,
sum(usd_volume) as volume_usd,
Run a query to Download Data