LTirrellphantom serum transfer_counts nft
    Updated 2024-01-23
    -- forked from phantom serum transfer_counts token @ https://flipsidecrypto.xyz/edit/queries/55338ab0-27fc-43bf-b03e-19b71de7a48c

    -- forked from phantom serum transfer_counts @ https://flipsidecrypto.xyz/edit/queries/262ee5f1-1759-479f-9347-ad09e5d833a4

    -- forked from phantom serum examples @ https://flipsidecrypto.xyz/edit/queries/bff6ffd5-e10d-4acb-8e0f-352dad7bfced

    -- forked from phantom serum @ https://flipsidecrypto.xyz/edit/queries/6a1a8b36-5cc6-4ad4-b466-719c2ce1b414

    with serum as (
    SELECT
    block_timestamp,
    block_id,
    tx_id,
    index
    FROM
    solana.core.fact_events
    WHERE 1=1
    and block_timestamp >= current_date - 90
    and program_id = 'DeJBGdMFa1uynnnKiwrVioatTuHmNLpyFKnmB5kaFdzQ'
    and succeeded
    and index=0
    ),
    metaplex as (
    SELECT
    tx_id,
    case when tx_id in (select tx_id from serum) then 'nft_phantom'
    else 'nft_not_phantom'
    end as type
    FROM
    solana.core.fact_events
    WHERE 1=1
    and block_timestamp >= current_date - 90
    and program_id = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'
    and succeeded
    -- and index>1
    -- and tx_id in (select tx_id from serum)
    Last run: about 1 year ago
    TX_COUNT
    TYPE
    1
    2599515nft_not_phantom
    2
    1736nft_phantom
    2
    50B
    123s