h4wkbase 2
    Updated 8 days ago
    -- forked from base total @ https://flipsidecrypto.xyz/studio/queries/1a3cedcc-7661-430c-a016-18be2367e48d

    with base as (
    -- select b.*
    -- from solana.core.fact_transactions a
    -- join lateral flatten (input => log_messages) logs
    -- join (select * from solana.core.fact_transfers
    -- where mint = 'DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5'
    -- and block_timestamp >= '2025-02-01') b using (tx_id, block_timestamp)
    -- join (select tx_id from solana.core.fact_events
    -- where program_id = 'DBrLFG4dco1xNC5Aarbt3KEaKaJ5rBYHwysqZoeqsSFE'
    -- and block_timestamp >= '2025-02-01') using (tx_id)
    -- where a.block_timestamp >= '2025-02-01'
    -- and logs.value = 'Program log: Instruction: ClaimToken'
    -- UNION ALL
    -- select *
    -- from $query('a4d30562-9cd3-4a63-a76a-56d408223107')
    select *
    from solana.core.fact_transfers
    where tx_from = '7od884qfm9vWEdKQALsXZ72xR9hdYedsqmkqHKJwC78G'
    and mint = 'DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5'
    and block_timestamp >= '2024-10-16'
    )
    , claimers as (
    select tx_to as claimer,
    count(distinct tx_id) as tx_count,
    sum(amount) as total_claim,
    any_value(tx_id) as sample_tx,
    case when total_claim < 1000 then '1. Claim < 1,000 DBR'
    when total_claim < 10000 then '2. Claim < 10,000 DBR'
    when total_claim < 100000 then '3. Claim < 100k DBR'
    when total_claim < 500000 then '4. Claim < 500k DBR'
    else '5. Claim = 500k DBR' end as type
    from base
    group by 1
    )
    Last run: 8 days ago
    SELLING_TYPE
    USER_COUNT
    1
    Sell Some186
    2
    Holding908
    3
    Accumulate More73
    4
    Sell All426
    4
    75B
    21s