Query editor
SELECTt1.week,t1.platform,sales,buyers,sellers,total_sales_vol_usd,total_sales_vol_arb,nfts_sold AS nft_collections_sold,t2.trader AS tradersFROM (SELECTDATE_TRUNC('week', block_time) AS week,platform,COUNT(DISTINCT tx_hash) AS sales,COUNT(DISTINCT buyer) AS buyers,COUNT(DISTINCT seller) AS sellers,SUM(amount_usd) AS total_sales_vol_usd,SUM(amount_usd * COALESCE(avg_price_arb,1.3375853089430894)) AS total_sales_vol_arb,COUNT(DISTINCT nft_contract_address) AS nfts_soldFROM (-- openseaSELECTblock_time,tx_hash,nft_contract_address,amount_usd,buyer,seller,'opensea' AS platformFROM seaport_arbitrum.tradesUNION ALL-- other marketplacesSELECTblock_time,tx_hash,nft_contract_address,amount_usd,buyer,seller,project AS platformFROM nft.tradesWHERE blockchain = 'arbitrum')LEFT JOIN (SELECTDATE_TRUNC('day', minute) AS day,AVG(price) AS avg_price_arbFROM prices.usdWHERE blockchain = 'ethereum'