adriaparcerisasThe Battle of the Solana NFT Aggregator 5
    Updated 2022-10-27
    select
    trunc(block_timestamp,'day') as date,
    marketplace,
    count(distinct tx_id) as sales,
    sum(sales) over (partition by marketplace order by date) as cum_sales,
    count(distinct purchaser) as buyers,
    sum(buyers) over (partition by marketplace order by date) as cum_buyers,
    count(distinct seller) as sellers,
    sum(sellers) over (partition by marketplace order by date) as cum_sellers,
    sum(sales_amount) as Volume,
    sum(volume) over (partition by marketplace order by date) as cum_volume,
    avg(sales_amount) as avg_price,
    avg(avg_price) over (partition by marketplace order by date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW ) as avg_price_ma_7day
    from solana.core.fact_nft_sales
    where marketplace in ('hyperspace','coral cube')
    and succeeded = 'TRUE' and block_timestamp>=CURRENT_DATE-INTERVAL '1 MONTH'
    group by 1,2
    order by 1 asc,2
    Run a query to Download Data