MadiTOP-10 seasons
Updated 2022-09-14Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
›
⌄
WITH nft_allday AS (
SELECT
date_trunc('days', b.block_timestamp) AS date,
a.SEASON as SEASON,
b.NFT_ID as nft_id,
b.price as price
FROM flow.core.dim_allday_metadata a
LEFT JOIN flow.core.ez_nft_sales b
ON a.NFT_ID = b.NFT_ID
)
SELECT
date,
SEASON,
ROUND(SUM(PRICE),2) as total_sales_volume
FROM nft_allday
WHERE SEASON = '2021'
OR SEASON = '2014'
OR SEASON = '2009'
OR SEASON = '2006'
OR SEASON = '2016'
OR SEASON = '2001'
OR SEASON = '2002'
OR SEASON = '2017'
OR SEASON = '2007'
OR SEASON = '2015'
--WHERE date >= DATEADD(day, -30, getdate())
GROUP BY date,SEASON
ORDER BY total_sales_volume DESC
Run a query to Download Data