Query editor
WITH sales_table AS (SELECTDATE_TRUNC('DAY', block_time) AS day,COUNT(DISTINCT seller) AS unique_sellers,COUNT(DISTINCT buyer) AS unique_buyers,SUM(amount_original) AS total_volume_eth,SUM(amount_usd) AS total_volume_usd,COUNT(*) AS total_salesFROM nft.tradesWHERE nft_contract_address = 0x851b728e568C9E10aB8007f27A525FbbEd29b259AND seller != 0x0000000000000000000000000000000000000000GROUP BY 1ORDER BY 1 DESC)SELECTday,unique_sellers,unique_buyers,total_volume_eth,total_volume_usd,total_sales,SUM(unique_sellers) OVER (ORDER BY day) AS cumulative_unique_sellers,SUM(unique_buyers) OVER (ORDER BY day) AS cumulative_unique_buyers,SUM(total_volume_eth) OVER (ORDER BY day) AS cumulative_total_volume_eth,SUM(total_volume_usd) OVER (ORDER BY day) AS cumulative_total_volume_usd,SUM(total_sales) OVER (ORDER BY day) AS cumulative_total_salesFROM sales_tableORDER BY day DESC