Afonso_DiazUntitled Query
    Updated 2023-01-29
    with t1 as (
    select
    a.tx_id
    from solana.core.fact_nft_sales a
    left join solana.core.fact_nft_sales b
    on a.purchaser = b.seller
    and a.mint = b.mint
    where a.succeeded = b.succeeded
    and a.marketplace = b.marketplace
    and a.marketplace = 'exchange art'
    and a.succeeded = 1
    ),

    t2 as (
    select
    b.tx_id
    from solana.core.fact_nft_sales a
    left join solana.core.fact_nft_sales b
    on a.seller = b.seller
    and b.block_timestamp > a.block_timestamp
    and a.purchaser = b.purchaser
    and a.mint = b.mint
    where a.succeeded = b.succeeded
    and a.marketplace = b.marketplace
    and a.marketplace = 'exchange art'
    and a.succeeded = 1
    ),

    t3 as (
    select distinct tx_id from t1
    union
    select distinct tx_id from t2
    )

    select
    iff(tx_id in (select tx_id from t3), 'Wash Trading', 'Regular Trading') as type,
    Run a query to Download Data