Updated 2022-10-27
    select--flow nft
    CONTRACT_NAME as NFTs,
    count(distinct buyer) as buyer_no,
    sum(price) as volume_sale,
    count(tx_id) as sale_count,
    buyer_no/count(distinct date_trunc(day, block_timestamp)) as average_buyer_day,
    volume_sale/count(distinct date_trunc(day, block_timestamp)) as average_volume_day
    from flow.core.fact_nft_sales s left join flow.core.dim_contract_labels b on s.NFT_COLLECTION=b.EVENT_CONTRACT
    where TX_SUCCEEDED='TRUE' and CURRENCY='A.ead892083b3e2c6c.DapperUtilityCoin'
    and BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period}}
    and NFTs = ('{{NFT_collection}}')
    group by 1

    Run a query to Download Data