Afonso_DiazUntitled Query
    Updated 2023-01-30
    select
    block_timestamp::date as day,
    marketplace,
    count(distinct tx_id) as sales_count,
    sum(sales_amount) as sales_volume,
    avg(sales_amount) as avg_sales_volume,
    count(distinct purchaser) as buyers_count,
    count(distinct seller) as sellers_count,
    sum(sales_count) over(partition by marketplace order by day) as cumulative_sales_count,
    sum(sales_volume) over(partition by marketplace order by day) as cumulative_sales_volume,
    sum(sellers_count) over(partition by marketplace order by day) as cumulative_sellers_count,
    sum(buyers_count) over(partition by marketplace order by day) as cumulative_buyers_count,
    avg(sales_volume) over (partition by marketplace order by day rows between 7 preceding and current row) as sales_volume_ma_7
    from solana.core.fact_nft_sales
    where block_timestamp > current_date - 90
    and succeeded = 1
    group by 1, 2
    order by 1, 2
    Run a query to Download Data