danielrDaily count of transactions
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 A as
(select date_trunc('{{Date_Trunc}}',BLOCK_TIMESTAMP) date,
SUPPLIED_USD as Amount,
'Supplied' as type,
AAVE_VERSION,
TX_HASH
FROM ethereum.aave.ez_deposits
where block_timestamp>=CURRENT_DATE - {{Period_From_Current_Date}}
and aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
),
B as
(select date_trunc('{{Date_Trunc}}',BLOCK_TIMESTAMP) date,
WITHDRAWN_USD as Amount,
'Withdrawn' as type,
AAVE_VERSION,
TX_HASH
FROM ethereum.aave.ez_withdraws
where block_timestamp>=CURRENT_DATE - {{Period_From_Current_Date}}
and aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
),
C as
(select * from
(select * from A
union all
select * from B))
SELECT date, AAVE_VERSION,
count(distinct tx_hash)
from C
group by 1, 2
Run a query to Download Data