bergUntitled Query
    Updated 2022-10-22
    with tab1 as (
    select
    block_timestamp::date as day,
    sum(price) as volume,
    avg(price) as avg_price,
    median(price) as median_price,
    count(DISTINCT tx_id) as sales_events,
    count(DISTINCT buyer) as buyers
    from flow.core.ez_nft_sales
    where nft_collection = 'A.329feb3ab062d289.RaceDay_NFT'
    group by day
    )

    SELECT *,
    avg(avg_price) over(order by day rows between 7 preceding and current row) as price_moving_avg
    from tab1
    Run a query to Download Data