hessSolana Stakes
Updated 2022-07-07Copy 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 stake_tx as ( select DISTINCT tx_id
from solana.core.fact_events
where instruction:programId='Stake11111111111111111111111111111111111111' and event_type='delegate' )
,
stake as ( select date(block_timestamp) as date , count(DISTINCT(tx_id)) as total, sum(total) over (order by date asc ) as Cumulative
from solana.core.fact_events
where instruction:programId='Stake11111111111111111111111111111111111111' and event_type='delegate' and block_timestamp::date >= CURRENT_DATE - 100
group by 1)
,
txs as ( select date(block_timestamp) as date , count(DISTINCT(tx_id)) as total, sum(total) over (order by date asc ) as Cumulative
from solana.core.fact_events
where tx_id not in ( select tx_id from stake_tx) and block_timestamp::date >= CURRENT_DATE - 100 and event_type is not null
group by 1)
select 'Stake' as type, *
from stake
UNION
select 'Other Activities' as type , *
from txs
Run a query to Download Data