select
BLOCK_TIMESTAMP::date as date ,
NFT_COLLECTION,
count (DISTINCT BUYER ) as num_buyers,
count (DISTINCT SELLER ) as num_sellers ,
count (DISTINCT TX_ID ) as sales_volume ,
sum (sales_volume) over (partition by NFT_COLLECTION order by date ) as growth_volume
from flow.core.fact_nft_sales
where TX_SUCCEEDED = true
and BLOCK_TIMESTAMP >= '2022-05-09'
group by 1,2