danielrMonthly 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
30
31
32
33
34
35
36
›
⌄
-- forked from Weekly count of transactions @ https://flipsidecrypto.xyz/edit/queries/d5b8de74-1c31-42f9-90d5-d501d1941bd3
-- forked from Daily count of transactions @ https://flipsidecrypto.xyz/edit/queries/2cc3d97e-fafa-40bf-bc76-093e0fc240f3
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