dannyamahSolBlaze Staking (Credit: Sbhn_NP)
    Updated 2025-03-25
    with price AS (
    SELECT
    hour::date AS Date,
    symbol,
    avg(price) AS price_in_usd
    FROM crosschain.price.ez_prices_hourly
    WHERE token_address = 'So11111111111111111111111111111111111111112'
    GROUP BY 1,2
    )

    SELECT
    date_trunc('day', block_timestamp) as date,
    CASE
    when action ='deposit' then 'Stake'
    when action = 'withdraw' then 'Instant UnStake'
    when action = 'withdraw_stake' then 'Delayed UnStake'
    END AS type,

    COUNT(DISTINCT tx_id) as txs,
    COUNT(DISTINCT address) as users,
    SUM(amount/pow(10,9)) as sol_amount,
    SUM(amount/pow(10,9)*price_in_usd) as usd_amount,
    AVG(amount/pow(10,9)*price_in_usd) as average_volume

    FROM solana.defi.fact_stake_pool_actions
    JOIN price
    ON block_timestamp::date = Date
    AND symbol = upper(token)
    WHERE 1 = 1
    AND stake_pool_name = 'blazestake'
    AND succeeded
    AND action in ('deposit', 'withdraw', 'withdraw_stake')
    AND date >= '2023-10-01'

    GROUP BY 1,2
    ORDER BY 1 DESC
    Last run: about 1 month ago
    DATE
    TYPE
    TXS
    USERS
    SOL_AMOUNT
    USD_AMOUNT
    AVERAGE_VOLUME
    1
    2025-04-16 00:00:00.000Stake442.8586359.75685185789.939212964
    2
    2025-04-16 00:00:00.000Instant UnStake110.0082154431.033919371.03391937
    3
    2025-04-15 00:00:00.000Stake551.80001234.61630341746.923260683
    4
    2025-04-15 00:00:00.000Delayed UnStake110.54497357171.03276353371.032763533
    5
    2025-04-15 00:00:00.000Instant UnStake1910.12931099216.8546102160.8870847482
    6
    2025-04-14 00:00:00.000Instant UnStake1551135.72706434717844.093702644115.123185178
    7
    2025-04-14 00:00:00.000Delayed UnStake20105636.13987349740985.65755934437049.282877967
    8
    2025-04-14 00:00:00.000Stake1010118.471615575.5106151671557.551061517
    9
    2025-04-13 00:00:00.000Delayed UnStake12212629954.1861964833899398.516325413193.610578481
    10
    2025-04-13 00:00:00.000Stake761.2066157.0736797522.439097107
    11
    2025-04-13 00:00:00.000Instant UnStake26827772.1504977391011768.836607543775.256853013
    12
    2025-04-12 00:00:00.000Stake2825318.332940022.6691299171429.381040354
    13
    2025-04-12 00:00:00.000Instant UnStake272716.3160406982051.34781345775.975844943
    14
    2025-04-11 00:00:00.000Instant UnStake252510.0997508641186.76701704547.470680682
    15
    2025-04-11 00:00:00.000Stake272715.71211846.24376379268.379398659
    16
    2025-04-10 00:00:00.000Stake3231113.12734347312915.324576774403.603893024
    17
    2025-04-10 00:00:00.000Instant UnStake372568.3563127787803.983893691210.918483613
    18
    2025-04-10 00:00:00.000Delayed UnStake222.992403879341.631529351170.815764675
    19
    2025-04-09 00:00:00.000Stake2827862.452793377.7538293334.919779607
    20
    2025-04-09 00:00:00.000Instant UnStake292292.54804499910020.176832042345.523339036
    ...
    1675
    152KB
    10s