-- forked from Polygon Top Sales Collections @ https://flipsidecrypto.xyz/edit/queries/38fbba98-6981-4504-9031-9970dd167f2d
SELECT
DATE_TRUNC('day',BLOCK_TIMESTAMP) AS DATE,
SUM(price)as price,
COUNT(DISTINCT TX_HASH)volume
FROM polygon.core.ez_nft_sales
WHERE project_name IS NOT NULL
GROUP BY DATE
ORDER BY DATE DESC