MLDZMNrace5
    Updated 2022-10-23
    with tb3 as (select
    dayname(to_date(block_timestamp::date)) as week_day,
    sum(price) as volume,
    count(*) as sales_count

    from flow.core.fact_nft_sales
    where TX_SUCCEEDED='TRUE' and CURRENCY='A.ead892083b3e2c6c.DapperUtilityCoin'
    and NFT_COLLECTION='A.329feb3ab062d289.RaceDay_NFT'
    group by 1)


    select avg(volume) as avg_volume, avg(sales_count), week_day,
    case when week_day in ('Sat', 'Sun') then 'WeekEnds'
    else 'WeekDays' END as date_type
    from tb3
    group by week_day
    Run a query to Download Data