Query editor
WITH merged_bebop AS (SELECTblockchain,max(block_date) as block_date,tx_hash,sum(amount_usd) as amount_usd,ARRAY_DISTINCT(ARRAY_AGG(token_sold_address)) as taker_tokens,ARRAY_DISTINCT(ARRAY_AGG(token_bought_address)) as maker_tokensFROMbebop.tradesgroup bytx_hash,blockchain)SELECTCOUNT(*) AS trades,blockchain,block_dateFROMmerged_bebopGROUP BYblock_date,blockchain