flyingfishSleepy - Near Delegators pt2
Updated 2023-07-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
›
⌄
with delegators_raw as(
select
address,
signer_id,
max(action_type) max_action,
count(1) actions_count
from(
select address,
signer_id,
tx_hash,
action,
case when action = 'staking' then 0
when action = 'unstaking' then 1
end action_type
from near.core.fact_staking_actions
where action in ('staking', 'unstaking')
and signer_id = 'binancecold3.near'
)
group by address, signer_id
having max_action = 0
)
select
address,
count(distinct signer_id) delegators
from delegators_raw
group by address
order by delegators desc
Run a query to Download Data