Query editor
WITH apechain_nft_trades AS (SELECTnft_contract_address,buyer,seller,token_id,amount_usd,royalty_fee_amount_usd,royalty_fee_percentage,platform_fee_amount_usd,block_dateFROM nft.tradesWHERE blockchain = 'apechain'AND block_date >= DATE('2024-08-28')AND amount_usd IS NOT NULL)SELECTnft_contract_address as collection,COUNT(*) as total_trades,COUNT(DISTINCT buyer) as unique_buyers,COUNT(DISTINCT seller) as unique_sellers,COUNT(DISTINCT token_id) as unique_tokens_traded,SUM(amount_usd) as total_volume_usd,AVG(amount_usd) as avg_price_usd,MIN(amount_usd) as floor_price_usd,MAX(amount_usd) as ceiling_price_usd,SUM(royalty_fee_amount_usd) as total_royalties_usd,SUM(platform_fee_amount_usd) as total_platform_fees_usd,AVG(royalty_fee_percentage) as avg_royalty_rate,MIN(block_date) as first_trade_date,MAX(block_date) as last_trade_dateFROM apechain_nft_tradesGROUP BY nft_contract_addressHAVING COUNT(*) >= 1ORDER BY total_volume_usd DESC;