adriaparcerisassolana price 10
    Updated 2023-06-26
    WITH
    sol_base as (select
    trunc(block_timestamp,'day') as days,
    stake_authority,
    vote_account,
    validator_rank,
    sum(post_tx_staked_balance/1e9 - pre_tx_staked_balance/1e9) as sol_delegated
    from solana.core.ez_staking_lp_actions
    where post_tx_staked_balance > pre_tx_staked_balance
    and event_type = 'delegate'
    and succeeded = 'TRUE'
    --and block_timestamp >= '2022-01-01'
    and node_pubkey is not null
    group by 1,2,3,4),

    sol_base2 as (select
    trunc(block_timestamp,'day') as days,
    withdraw_destination,
    vote_account,
    validator_rank,
    sum(withdraw_amount/1e9) as sol_withdrawn
    from solana.core.ez_staking_lp_actions
    where event_type = 'withdraw'
    --and block_timestamp >= '2022-01-01'
    and succeeded = 'TRUE'
    and node_pubkey is not null
    group by 1,2,3,4),
    sol_base3 as(select
    ifnull(a.days, b.days) as days,
    ifnull(a.stake_authority, b.withdraw_destination) as staker,
    ifnull(a.vote_account, b.vote_account) as validator,
    address_name,
    initcap(split(address_name, ': ')[1]) as validator_names,
    ifnull(a.validator_rank, b.validator_rank) as validator_ranks,
    Run a query to Download Data