Afonso_DiazTop Stakers
Updated 2025-02-22
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
›
⌄
with stake_data as (
select
origin_from_address as user,
sum(decoded_log:value::bigint / 1e18) as total_staked
from
kaia.core.ez_decoded_event_logs
where
contract_address = '0x999999999939ba65abb254339eec0b2a0dac80e9'
and event_name = 'Transfer'
and tx_succeeded
and origin_from_address = decoded_log:to
and origin_to_address = '0xf50782a24afcb26acb85d086cf892bfffb5731b5'
and tx_hash in (
select distinct tx_hash
from kaia.core.ez_decoded_event_logs
where event_name = 'StakeKlay'
and decoded_log:from = '0x999999999939ba65abb254339eec0b2a0dac80e9'
)
group by user
),
total_staked as (
select sum(total_staked) as overall_staked from stake_data
),
ranked_stakers as (
select
user,
total_staked,
total_staked / (select overall_staked from total_staked) * 100 as stake_percentage,
rank() over (order by total_staked desc) as rank
from stake_data
)
select
user,
QueryRunArchived: QueryRun has been archived