Afonso_DiazOvertime
    Updated 2025-03-03
    with

    main as (
    select
    tx_id,
    block_timestamp,
    signers[0] as user,
    --credited to @pine
    iff(tx_id in (select distinct tx_id from solana.core.fact_events b where a.tx_id = b.tx_id and program_id = 'voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj' and block_timestamp >= '2025-01-15'), 'Claim', 'Claim & Stake') as claim_type,
    inner_instruction['instructions'][1]['parsed']['info']['amount'] / 1e6 as amount
    from
    solana.core.fact_events a
    where
    program_id = 'DiS3nNjFVMieMgmiQFm6wgJL7nevk4NrhXKLbtEH1Z2R'
    and block_timestamp >= '2025-01-22'
    )

    select
    date_trunc('hour', block_timestamp) as date,
    count(distinct tx_id) as claims,
    count(distinct user) as users,
    sum(amount) as volume,
    avg(amount) as average_amount,
    max(amount) as max_amount,
    sum(volume) over (order by date) as cumulative_volume
    from
    main
    group by 1
    order by 1
    Last run: about 2 months ago
    DATE
    CLAIMS
    USERS
    VOLUME
    AVERAGE_AMOUNT
    MAX_AMOUNT
    CUMULATIVE_VOLUME
    1
    2025-01-22 03:00:00.000320.020.010.010.02
    2
    2025-01-22 05:00:00.000110.02
    3
    2025-01-22 07:00:00.0001615141114.02
    4
    2025-01-22 08:00:00.0005551119.02
    5
    2025-01-22 09:00:00.00018641123.02
    6
    2025-01-22 10:00:00.000182321125.02
    7
    2025-01-22 11:00:00.00019321127.02
    8
    2025-01-22 12:00:00.000211211128.02
    9
    2025-01-22 14:00:00.0001128.02
    10
    2025-01-22 15:00:00.0002477624165264217401091.49171727234894826421768.02
    11
    2025-01-22 16:00:00.00017104416455793691245562.062036571594352120113013.02
    12
    2025-01-22 17:00:00.000615876058825447507420.849504689300000145560520.02
    13
    2025-01-22 18:00:00.000380113733115256153409.099887375101105160816673.02
    14
    2025-01-22 19:00:00.000270792660410520742396.171938545120500171337415.02
    15
    2025-01-22 20:00:00.000231312281011568337507.917852125305500182905752.02
    16
    2025-01-22 21:00:00.00017704174227760190445.962301017305500190665942.02
    17
    2025-01-22 22:00:00.00015826155437433707479.068569956320500198099649.02
    18
    2025-01-22 23:00:00.00013781135955957162438.833296501120000204056811.02
    19
    2025-01-23 00:00:00.00012680125145602174448.425038021152861209658985.02
    20
    2025-01-23 01:00:00.00012086119085220280439.269606193166538214879265.02
    ...
    1952
    132KB
    10s