Sbhn_NPstaratlas users activity
    Updated 2023-05-07
    with base as (select
    distinct block_timestamp,
    tx_id,
    case
    when program_id = 'FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW' then 'Gameplay'
    when program_id = 'traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg' then 'NFT Marketplace'
    when program_id = 'gateVwTnKyFrE8nxUUgfzoZTPKgJQZUbLsEidpG4Dp2' then 'Staking'
    end as action,
    signers[0] as users

    from solana.core.fact_events
    where program_id in (
    'FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW',
    'traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg',
    'gateVwTnKyFrE8nxUUgfzoZTPKgJQZUbLsEidpG4Dp2'
    )
    and succeeded='TRUE'
    )

    select date_trunc('{{Date}}',block_timestamp) as date,
    action,
    count(DISTINCT tx_id) as txs,
    count(DISTINCT users) as people
    from base
    group by 1,2
    Run a query to Download Data