campUntitled Query
Updated 2022-11-14Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
select
date_trunc('week',BLOCK_TIMESTAMP) as Date,
case when action in ('DelegatorTokensCommitted','TokensCommitted') then 'Stake'
when action in ('DelegatorUnstakedTokensWithdrawn','UnstakedTokensWithdrawn') then 'Unstake'
when action in ('DelegatorRewardTokensWithdrawn','RewardTokensWithdrawn') then 'Claim Reward' end as action_type,
case when amount < 5 then 'Less Than 5 FLOW'
when amount >= 5 and amount < 10 then '5 - 10 FLOW'
when amount >= 10 and amount < 100 then '10 - 100 FLOW'
when amount >= 100 and amount < 1000 then '100 - 1000 FLOW'
else 'More Than 1000 FLOW' end as volume_type,
count (distinct tx_id) as TX_Count
from flow.core.ez_staking_actions
where tx_succeeded = 'TRUE' and BLOCK_TIMESTAMP::date<CURRENT_DATE and action_type='Claim Reward'
group by 1,2,3
order by 1 asc
Run a query to Download Data