Maditopdelegatorsrewarded
Updated 2023-01-03Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with claim as (select
DELEGATOR_ADDRESS,
sum(AMOUNT/pow(10,DECIMAL)) as claim_amount
from osmosis.core.fact_staking_rewards where TX_STATUS = 'SUCCEEDED' and CURRENCY = 'uosmo'
and ACTION = 'claim' group by 1
),
withdraw as (
select
DELEGATOR_ADDRESS,
sum(AMOUNT/pow(10,DECIMAL)) as withdraw_amount
from osmosis.core.fact_staking_rewards
where TX_STATUS = 'SUCCEEDED' and CURRENCY = 'uosmo'
and ACTION = 'withdraw_rewards' group by 1
)
select
a.DELEGATOR_ADDRESS, round(sum(claim_amount)) as claim_amount, round(sum(withdraw_amount)) as withdraw_amount
from claim a join withdraw b on a.DELEGATOR_ADDRESS = b.DELEGATOR_ADDRESS
group by 1 order by 2 desc limit 100
Run a query to Download Data