WatchmenJUP claims base
    Updated 2024-05-21
    select
    date_trunc('hour', block_timestamp) as date,
    count(DISTINCT tx_to) as claimers,
    sum(amount) as claimed,
    sum(claimers) over (
    order by
    date
    ) as "Total Claimers",
    sum(claimed) over (
    order by
    date
    ) as "Total Claimed",
    1000000000 - "Total Claimed" as remaining,
    "Total Claimed" / 1000000000 * 100 as "Claimed (%)"
    from
    solana.core.fact_transfers
    join solana.core.fact_events using (block_timestamp, tx_id)
    where
    block_timestamp > '2024-01-31'
    and program_id = 'meRjbQXFNf5En86FXT2YPz1dQzLj4Yb3xK8u1MVgqpb'
    and MINT = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN' --
    -- Certain claim txs are batched with token forwards eg: 5Cpi4dFKXRwh1hn6eCroKHmaGNJsRzr3LVV72YSfYc6Dctdzx9bXK3XQLozf85gvaAasd6Ei8RFR7HRxgpywGasJ
    -- filtering out based on events as it only logs for program_id and its receiver.
    -- Credit - Marqu for the catch.
    and tx_to = instruction :accounts [4]
    group by
    1
    order by
    date desc
    QueryRunArchived: QueryRun has been archived