CryptoIcicleRaceDay NFTs - Sale Volume - 7-day MA
    Updated 2022-10-23
    -- RaceDay NFTs
    -- Pay by Quality Your score determines your final payout.
    -- Grand Prize 153.062 FLOW (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 102.041 FLOW
    -- Score Multiplier 0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Flow
    -- Level Intermediate
    -- Difficulty Hard

    -- How does Speedway Motorsports RaceDay NFTs stack up to sports NFT collections in the FLOW ecosystem? What other projects are RaceDay fans buying?
    -- Create a dashboard that shows off a high-level project overview of RaceDAY. Include at least these metrics, along with any others you find notable or interesting:
    -- Average Sales volume (daily/weekly/monthly)
    -- Total Sales Volume
    -- Secondary Sales vs. Mint Sales
    -- Daily Average Sales Price and 7-day moving average
    -- Total Unique Buyers
    -- Average Buyers/Day
    -- Social Mentions/Shares

    -- In the second part of this bounty, look for cross-project comparative metrics like the following:
    -- Other collections RaceDay fans are buying
    -- Purchase frequency, or the distribution of tokens owned per wallet
    -- Average Number of NFTs held per wallet
    -- Average Purchase Price of NFTs held by RaceDay fans
    -- BONUS: Find free redemption buyers to future buyers, i.e., were first time purchasers someone that claimed a free NFT previously,
    -- or, was their first experience with RaceDay an actual purchase.
    -- SQL Credit: https://app.flipsidecrypto.com/velocity/queries/d2b8b8fc-577c-4772-9a17-eb6d83effaf3

    WITH sales as (
    SELECT
    date_trunc('{{date_range}}',block_timestamp) as day,
    sum(price) as volume,
    avg(price) as avg_volume,
    avg(price) as avg_price,
    median(price) as median_price,
    count(DISTINCT tx_id) as sales_events,
    Run a query to Download Data