kiacryptoThe number of unique wallets that trade NFT on each marketplace
    Updated 2022-06-05
    with flow as (
    select date_trunc('day', block_timestamp) as date, buyer as traders
    from flow.core.fact_nft_sales
    where block_timestamp::date >= '2022-05-09' and marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3', 'A.c1e4f4f4c4257510.Market') and tx_succeeded = true
    union all
    select date_trunc('day', block_timestamp) as date, seller as traders
    from flow.core.fact_nft_sales
    where block_timestamp::date >= '2022-05-09' and marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3', 'A.c1e4f4f4c4257510.Market') and tx_succeeded = true
    ),

    sol as (
    select date_trunc('day', block_timestamp) as date, purchaser as traders
    from flipside_prod_db.solana.fact_nft_sales
    where block_timestamp::date >= '2022-05-09' and marketplace in ('magic eden v1', 'magic eden v2') and succeeded = true
    union all
    select date_trunc('day', block_timestamp) as date, mint as traders
    from flipside_prod_db.solana.fact_nft_sales
    where block_timestamp::date >= '2022-05-09' and marketplace in ('magic eden v1', 'magic eden v2') and succeeded = true
    ),

    eth as (
    select date_trunc('day', block_timestamp) as date, buyer_address as traders
    from flipside_prod_db.ethereum_core.ez_nft_sales
    where block_timestamp::date >= '2022-05-09' and platform_name = 'opensea'
    union all
    select date_trunc('day', block_timestamp) as date, seller_address as traders
    from flipside_prod_db.ethereum_core.ez_nft_sales
    where block_timestamp::date >= '2022-05-09' and platform_name = 'opensea'
    )
    select date, count(distinct traders) as unique_wallets, sum(unique_wallets) over (order by date) as cumulative_unique_wallets, 'NBA Top Shot' as marketplace
    from flow
    group by 1

    union all

    Run a query to Download Data