hbd1994Untitled Query
    Updated 2022-11-14
    (select
    date(block_timestamp) as "Date",
    case
    when block_timestamp < '2022-11-02' then 'Before FTX Catastrophe'
    when block_timestamp >= '2022-11-02' and block_timestamp < '2022-11-06' then 'From CoinDesk Report'
    when block_timestamp >= '2022-11-06' then 'CZ Reaction and the Beginning of FTX Catastrophe'
    end as "Timeline",
    STAKE_POOL_NAME as "Staking Pool",
    case
    when action ilike '%deposit%' then 'Deposit'
    when action ilike '%withdraw%' then 'Withdraw'
    when action ilike '%order%' then 'Withdraw'
    else 'Claim' end as "Action Type",
    count (distinct tx_id) as "Number of Transactions",
    count (distinct address) as "Number of Users",
    sum (amount/1e9) as "Total Volume (SOL)",
    'Deposit' as "Action"
    from solana.core.fact_stake_pool_actions
    where succeeded = 'TRUE'
    and block_timestamp < CURRENT_DATE
    and block_timestamp >= CURRENT_DATE - 30
    and "Action Type" is not null
    and "Action Type" = 'Deposit'
    group by 1 , 2 , 3 , 4
    )
    union
    (select
    date(block_timestamp) as "Date",
    case
    when block_timestamp < '2022-11-02' then 'Before FTX Catastrophe'
    when block_timestamp >= '2022-11-02' and block_timestamp < '2022-11-06' then 'From CoinDesk Report'
    when block_timestamp >= '2022-11-06' then 'CZ Reaction and the Beginning of FTX Catastrophe'
    end as "Timeline",
    STAKE_POOL_NAME as "Staking Pool",
    case
    when action ilike '%deposit%' then 'Deposit'
    Run a query to Download Data