dr1888Top 5 staker and unstakers
Updated 2023-06-04
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
›
⌄
with A as(
SELECT
ORIGIN_FROM_ADDRESS as User,
sum(AMOUNT) as Total_Amount,
'Unstaker' as label
from ethereum.core.ez_token_transfers
where from_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and ORIGIN_TO_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and block_timestamp >= CURRENT_DATE - {{Period_From_Current_Date}}
and SYMBOL = 'AAVE'
group by 1
order by 2 DESC
limit 5
),
B as (
SELECT
ORIGIN_FROM_ADDRESS as User,
sum(AMOUNT) as Total_Amount,
'Staker' as label
from ethereum.core.ez_token_transfers
where TO_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and ORIGIN_TO_ADDRESS='0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and block_timestamp >= CURRENT_DATE - {{Period_From_Current_Date}}
and SYMBOL='AAVE'
group by 1
order by 2 DESC
limit 5
),
C as(
select * from A
union all
select * from B
)
select * from C
Run a query to Download Data