Query editor
/* Success! If you're still running into issues, check out https://dune.com/docs/query/syntax-differences/ or reach out in the #dune-sql Discord channel. */WITHsales AS (SELECTDATE_TRUNC('month', block_time) AS time,CASEWHEN project IN ('opensea','x2y2','blur','looksrare','sudoswap','cryptopunks','magiceden') THEN projectELSE 'others'END AS marketplaces,SUM(CAST(amount_usd AS DOUBLE)) AS amountFROMnft.tradesWHEREblock_time >= CURRENT_TIMESTAMP - INTERVAL '2' yearand tx_hash not in (select tx_hash from query_2381325)GROUP BY1,2),users AS (SELECTtime,marketplaces,COUNT(DISTINCT users) AS usersFROM(SELECT DISTINCTDATE_TRUNC('month', block_time) AS time,CASEWHEN project IN ('opensea','x2y2','blur','looksrare','sudoswap','cryptopunks','magiceden') THEN projectELSE 'others'END AS marketplaces,buyer AS usersFROMnft.tradesWHEREblock_time >= CURRENT_TIMESTAMP - INTERVAL '2' yearUNION ALLSELECT DISTINCTDATE_TRUNC('month', block_time) AS time,CASEWHEN project IN ('opensea','x2y2',