LTirrell2023-05-19 06:27 PM
Updated 2023-05-23
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
›
⌄
with latest_stake_vol as (
select
block_timestamp,
tx_id,
event_type,
signers [0] as fee_payer,
case
when event_type = 'withdraw' and stake_authority is null then fee_payer
else stake_authority
end as stake_authority,
withdraw_authority,
stake_account,
post_tx_staked_balance / pow(10, 9) as net_stake,
row_number () over (
partition by stake_account
order by
block_timestamp desc
) as rn,
vote_account,
node_pubkey,
validator_name,
validator_rank,
commission
from
solana.core.ez_staking_lp_actions
-- where
-- SUCCEEDED = TRUE
-- and block_timestamp is not null
-- and event_type not in ('setLockup')
-- and block_timestamp::date <= '2022-05-22'
-- ),
-- base as (
-- select
-- stake_authority as staker,
-- case
Run a query to Download Data