MLDZMNworm13
    Updated 2022-08-11
    with tb1 as (select
    BLOCK_TIMESTAMP,
    SIGNERS[0] as wallets
    from solana.core.fact_transactions
    where INSTRUCTIONS[0]:programId='wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
    and POST_TOKEN_BALANCES[0]:mint='7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'
    and POST_TOKEN_BALANCES[0]:uiTokenAmount:uiAmount<PRE_TOKEN_BALANCES[0]:uiTokenAmount:uiAmount --bridge from solana to ETH
    and BLOCK_TIMESTAMP>=CURRENT_DATE-90
    ),

    tb2 as (
    select
    x.block_timestamp,
    x.tx_id,
    SIGNERS[0] as users
    from solana.core.fact_transactions x
    join tb1 y on x.SIGNERS[0] = y.wallets and x.block_timestamp<y.block_timestamp --before bridge
    order by 1
    )

    select
    distinct EVENT_TYPE as first_actions,
    count(distinct tx_id) as counts
    from solana.core.fact_events
    where tx_id in (select tx_id from tb2)
    group by 1
    having first_actions is not null
    order by 2 desc limit 10


    Run a query to Download Data