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
    claim_type,
    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
    from
    main
    group by 1

    Last run: 20 days ago
    CLAIM_TYPE
    CLAIMS
    USERS
    VOLUME
    AVERAGE_AMOUNT
    MAX_AMOUNT
    1
    Claim & Stake732844694738276441166.02430.530008831594352
    2
    Claim13074312821458123504466.5219561921228071
    2
    122B
    3s