mlhUntitled Query
Updated 2022-11-15
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
select date_trunc('day', block_timestamp) as day, stake_pool_name,
case when action ilike '%deposit%' then 'Stake/Deposit'
when action ilike '%withdraw%' then 'Unstake/Withdraw'
when action ilike 'order_unstake' then 'Order to Unstake'
when action ilike 'claim' then 'Claim Rewards'
else null end as action_type,
count (distinct tx_id) as trxs,
count (distinct address) as Users,
sum (amount/1e9) as Total_Volume,
avg (amount/1e9) as Average_Volume
from solana.core.fact_stake_pool_actions
where succeeded = 'TRUE'
and block_timestamp >= CURRENT_DATE - 7
and action_type is not null
group by 1, 2, 3
order by 1
Run a query to Download Data