Query editor
SELECTdate_trunc('day',block_time) as time, 'nft' as market, blockchain, project, version, sum(amount_usd) as volume_usd, count(*) as tradesFROM nft.tradesWHERE project != 'magiceden' OR (project = 'magiceden' and version IN ('v1','launchpad_v3'))GROUP BY 1,2,3,4,5UNION ALLSELECTdate_trunc('day',block_time) as time, 'nft' as market, blockchain, project, version, sum(amount_usd) as volume_usd, count(*) as tradesFROM nft_solana.tradesGROUP BY 1,2,3,4,5UNION ALLSELECTdate_trunc('day',block_time) as time, 'dex' as market, blockchain, project, cast(version as VARCHAR) version, sum(amount_usd) as volume_usd, count(*) as tradesFROM dex.tradesGROUP BY 1,2,3,4,5UNION ALLSELECTdate_trunc('day',block_time) as time, 'dex' as market, blockchain, project, cast(version as VARCHAR) version, sum(amount_usd) as volume_usd, count(*) as tradesFROM dex_solana.tradesGROUP BY 1,2,3,4,5