MadiTOP-10 seasons
    Updated 2022-09-14
    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