ydcny555solana staked and unstaked area visual since Oct 2022
    with all_tx_stake as(
    select TX_ID from solana.core.fact_events
    where SUCCEEDED = 'TRUE' and BLOCK_TIMESTAMP::date >= '2022-10-01'
    and PROGRAM_ID = 'Stake11111111111111111111111111111111111111'
    ),
    all_tx_nfts as(
    select TX_ID from solana.core.FACT_NFT_SALES
    where SUCCEEDED = 'TRUE' and BLOCK_TIMESTAMP::date >= '2022-10-01'
    ),


    stake as (
    select
    date_trunc('day', block_timestamp) as date,
    count(DISTINCT(INSTRUCTION:parsed:info:stakeAuthority)) as delegate
    from solana.core.fact_events
    where
    EVENT_TYPE = 'delegate'
    and tx_id in (select tx_id from all_tx_stake)
    group by 1
    ),
    unstake as (
    select
    date_trunc('day', block_timestamp) as date2,
    count(DISTINCT(INSTRUCTION:parsed:info:destination)) as withdrow
    from solana.core.fact_events
    where
    EVENT_TYPE = 'withdraw'
    and tx_id in (select tx_id from all_tx_stake)
    group by 1
    ),
    mints as (
    select
    date_trunc('day', block_timestamp) as date3,
    count(DISTINCT(INSTRUCTION:parsed:info:destination)) as sale_nfts
    from solana.core.fact_events
    Run a query to Download Data