LittlerDatamoonwalk event type per events
    Updated 2025-04-21
    -- forked from moonwalk counting users @ https://flipsidecrypto.xyz/studio/queries/e1b8d7dc-c2c2-4f5b-82c0-c63548926842

    with moonwalk_bettors as (
    select
    /* tx_id
    ,block_timestamp
    ,event_type
    ,decoded_instruction:accounts[0]
    ,decoded_instruction:accounts[0]:name
    ,decoded_instruction:accounts[0]:pubkey as funding_address
    ,decoded_instruction:accounts[1]:name --game no idea what it means
    ,decoded_instruction:accounts[1]:pubkey
    ,decoded_instruction:accounts[2]:name --gamePlayer player account
    ,decoded_instruction:accounts[2]:pubkey
    ,decoded_instruction:accounts[3]:name --treasury
    ,decoded_instruction:accounts[3]:pubkey
    --,decoded_instruction:args:gameId */ event_type
    ,count(*) transactions
    --,decoded_instruction:args
    from solana.core.ez_events_decoded
    where block_timestamp > '2024-03-22'
    and program_id = 'FitAFk15vtx2PBjfr7QTnefaHRx6HwajRiZMt1DdSSKU'
    and succeeded = 'TRUE'
    --and event_type = 'deposit'
    group by 1
    )

    select
    *
    from moonwalk_bettors
    order by transactions desc
    --and tx_id = '39koDXKM1SAXTZCrS27AD94UYPgQpFMFaTNceCPCJLPKJnW9fSJ23B6n6GEaZMQwQ2hcWkuZzx2FJLGHtPsodtPU' --creating account ingame


    with withdraw as (
    select
    QueryRunArchived: QueryRun has been archived