SELECT
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS "Time",
CASE
WHEN MARKETPLACE = 'coral cube' THEN 'Coral Cube'
WHEN MARKETPLACE = 'hyperspace' THEN 'Hyperspace'
ELSE 'Other'
END AS marketplace,
COUNT(DISTINCT TX_ID) AS "Sales",
COUNT(DISTINCT Purchaser) AS "Purchaser",
SUM(SALES_AMOUNT) AS "Sales volume"
FROM solana.core.fact_nft_sales s
WHERE BLOCK_TIMESTAMP >= '2022-03-01'
GROUP BY 1,2
ORDER BY 1 DESC