Elprognerd1 - overall d&w
Updated 2023-06-05
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
›
⌄
with t1 as(select date_trunc('month',BLOCK_TIMESTAMP) as date,
'Deposit' as action,
ISSUED_TOKENS as amount,
DEPOSITOR_ADDRESS,
AAVE_VERSION,
TX_HASH
FROM ethereum.aave.ez_deposits
where aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
union all
select date_trunc('month', BLOCK_TIMESTAMP) as date,
'Withdrawal' as action,
WITHDRAWN_TOKENS as amount,
DEPOSITOR_ADDRESS,
AAVE_VERSION,
TX_HASH
FROM ethereum.aave.ez_withdraws
where aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9')
SELECT
action,
sum(amount) as "Total volume",
avg(amount) as "Average volume per TXN",
count(DISTINCT TX_HASH) as "Number of transactions",
count(DISTINCT DEPOSITOR_ADDRESS) as "Number of unique addresses",
"Total volume"/"Number of unique addresses" as "Volume per user"
from t1
GROUP BY 1
Run a query to Download Data