Updated 2022-10-23
    SELECT block_timestamp::date as daily , sum(price)/count(tx_id) as average
    , avg(average) over (order by daily rows between 6 preceding and current row ) as MA7
    , avg(average) over (order by daily rows between 20 preceding and current row ) as MA21
    from flow.core.ez_nft_sales
    where NFT_COLLECTION ilike '%raceday%'
    and TX_SUCCEEDED ilike '%TRUE%'
    group by 1

    Run a query to Download Data