SpiltadavidSales volume (Daily) Visual
    Updated 2022-10-24
    with Price as (
    select
    date_trunc('day', TIMESTAMP) as date,
    avg (price_usd) as price
    from
    flow.core.fact_prices
    where
    source = 'coinmarketcap'
    and symbol = 'FLOW'
    group by
    1
    ),
    Data as (
    select
    NFTs_Sales.block_timestamp as date,
    case
    when currency = 'A.1654653399040a61.FlowToken' then Price.price * NFTs_Sales.price
    else NFTs_Sales.price
    end as price
    from
    flow.core.ez_nft_sales NFTs_Sales
    join Price on (
    date_trunc('day', NFTs_Sales.block_timestamp) = price.date
    )
    where
    nft_collection ilike 'A.329feb3ab062d289.RaceDay_NFT'
    and tx_succeeded = 'TRUE'
    )
    select
    date_trunc('day', date) as date,
    sum (price) as "Sales volume (USD$)",
    avg (price) as "AVG Sales Price (USD$)"
    from
    Data
    group by
    1
    Run a query to Download Data