bachinfl4
    Updated 2022-12-06

    select
    date(block_timestamp) as day,
    case when date(block_timestamp) >= '2022-11-24' then 'Week After Thanks giving day'
    when date(block_timestamp) = '2022-11-24' then 'On Thanks giving day'
    when date(block_timestamp) < '2022-11-24' then 'Week Before Thanks giving day'
    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
    and block_timestamp >= '2022-11-17' and block_timestamp <= '2022-12-02'
    group by day,
    time_period
    order by day
    desc
    Run a query to Download Data