0xHaM-dstake
Updated 2022-10-16Copy Reference Fork
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
›
⌄
select
BLOCK_TIMESTAMP::DATE as date,
'Stake Pre Hack' as status,
COUNT(DISTINCT TX_ID) as tx_cnt,
count(DISTINCT SIGNERS[0]) as user_cnt,
sum((PRE_BALANCES[0]/1e9) - (POST_BALANCES[0]/1e9)) as stake_amt,
avg((PRE_BALANCES[0]/1e9) - (POST_BALANCES[0]/1e9)) as avg_stake_amt
from solana.core.fact_staking_lp_actions
where EVENT_TYPE in ('delegate')
and SUCCEEDED = 'TRUE'
and BLOCK_TIMESTAMP::date >= '2022-10-01'
and block_timestamp::date < '2022-10-11'
and PROGRAM_ID = 'Stake11111111111111111111111111111111111111'
GROUP BY 1
UNION
select
BLOCK_TIMESTAMP::DATE as date,
'UnStake Pre Hack' as status,
COUNT(DISTINCT TX_ID) as tx_cnt,
count(DISTINCT SIGNERS[0]) as user_cnt,
sum((POST_BALANCES[0]/1e9) - (PRE_BALANCES[0]/1e9)) as unstake_amt,
avg((POST_BALANCES[0]/1e9) - (PRE_BALANCES[0]/1e9)) as avg_unstake_amt
from solana.core.fact_staking_lp_actions
where EVENT_TYPE in ('withdraw')
and SUCCEEDED = 'TRUE'
and BLOCK_TIMESTAMP::date >= '2022-10-01'
and block_timestamp::date < '2022-10-11'
and PROGRAM_ID = 'Stake11111111111111111111111111111111111111'
GROUP BY 1
UNION
select
BLOCK_TIMESTAMP::DATE as date,
Run a query to Download Data