gokcinsolmin
    Updated 2022-08-10

    with bridge as (select wallet,
    a.tx_id ,
    date
    from solana.fact_transactions a join bridge b on a.signers[0] = b.wallet
    where date < block_timestamp
    group by 1,2,3
    ) ,

    second_transaction as (
    select wallet, tx_id, min(date) from first_transaction
    group by 1,2

    ),


    event_function as (
    select
    b.inner_instruction:instructions[0]:parsed:type as event_type,
    a.tx_id,
    INSTRUCTION:accounts as wallet
    from flipside_prod_db.solana.fact_transactions a
    inner join solana.core.fact_events b
    on a.tx_id = b.tx_id
    join second_tranasaction c on b.tx_id =c.tx_id
    where b.program_id = 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
    and b.succeeded = 'TRUE'
    and b.block_timestamp >= '2022-01-01'

    )

    select
    event_type,
    count(wallet) as total_users,
    count(tx_id) as tx_count
    Run a query to Download Data