farid-c9j0VMtop shot
    Updated 2022-06-29
    with unique_wallets as (
    select date_trunc('day', block_timestamp) as date, buyer as traders
    from flow.core.fact_nft_sales
    where marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3')
    and tx_succeeded = true
    union all
    select date_trunc('day', block_timestamp) as date, seller as traders
    from flow.core.fact_nft_sales
    where marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3')
    and tx_succeeded = true
    ),
    wallets_count as (
    select date as date1, count(distinct traders) as unique_wallets
    from unique_wallets
    group by 1
    ),
    sales_volume as (
    select date_trunc('day', block_timestamp) as date, sum(price) as sales_volume
    from flow.core.fact_nft_sales
    where marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3')
    and tx_succeeded = true
    group by 1
    )
    select date, sales_volume, unique_wallets
    from wallets_count, sales_volume
    where date = date1




    Run a query to Download Data