bachinfl2
    Updated 2022-12-06

    select
    date(date_trunc('week',block_timestamp)) as week,
    case when block_timestamp > '2022-11-24' then 'After Thanks giving'
    when block_timestamp <= '2022-11-24' then 'Before Thanks giving'
    end as time_period,
    count(distinct nft_id) as no_of_nfts_sold,
    round(sum(price),2) as total_sale_volume,
    round(avg(price),2) as avg_sale_volume,
    count(distinct tx_id) as no_of_sales,
    count(distinct buyer) as no_of_buyers,
    count(distinct seller) as no_of_sellers
    from flow.core.dim_contract_labels
    inner join flow.core.ez_nft_sales
    on event_contract=nft_collection
    where contract_name like '%AllDay%'
    and tx_succeeded = true
    group by week,
    time_period
    Run a query to Download Data