Tobi_12024-07-02 11:09 AM
Updated 2024-07-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
⌄
SELECT
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS sale_day,
COUNT(TX_ID) AS daily_sales,
SUM(COUNT(TX_ID)) OVER (ORDER BY DATE_TRUNC('day', BLOCK_TIMESTAMP)) AS cumulative_sales
FROM
solana.nft.fact_nft_sales;
WHERE
BLOCK_TIMESTAMP >= DATEADD(day, -30, CURRENT_TIMESTAMP)
AND SUCCEEDED = TRUE
GROUP BY
sale_day
ORDER BY
sale_day;
QueryRunArchived: QueryRun has been archived