CartanGroupProjects with Most Sales Volume (USD) copy
    Updated 2023-09-26
    -- forked from bg_alt / Projects with Most Sales Volume (USD) @ https://flipsidecrypto.xyz/bg_alt/q/SiCUY5VxxKX8/projects-with-most-sales-volume-usd

    SELECT
    CASE
    when nft_address = '0x719c595e9593f361290ea57c7c357bec847dd80b' then 'Royalty NFT status 1 - Activator'
    else project_name
    end as project_name,
    round(sum(price_usd), 2) as sales_usd_volume,
    count(*) as sales_count,
    round(sales_usd_volume / sales_count, 2) as average_price,
    nft_address
    FROM
    polygon.core.ez_nft_sales
    WHERE
    erc1155_value IS NULL
    GROUP BY
    nft_address,
    project_name
    HAVING
    sales_usd_volume IS NOT NULL
    ORDER BY
    sales_usd_volume DESC
    LIMIT
    100;


    Run a query to Download Data