Query editor
WITH all_trades AS(SELECTt.block_time,t.token_a_address,COALESCE(t.token_a_symbol,t.token_a_address::text) as token_a,t.token_b_address,COALESCE(t.token_b_symbol,t.token_b_address::text) as token_b,t.exchange_contract_address -- exchange_contract_address is the v3 LP Position,t.usd_amountFROM dex."trades" tWHERE t.project = 'Uniswap'AND t.block_time >= now() - interval '24 hours'ORDER BY t.block_time DESC)SELECTcasewhen lower(token_a) > lower(token_b) then concat(replace(token_b::text,'\','0'), '-', replace(token_a::text,'\','0'))else concat((replace(token_a::text,'\','0')), '-', (replace(token_b::text,'\','0')))end as token_pair,SUM(usd_amount) AS sum_usd,count(*),array_agg(replace(exchange_contract_address::text,'\','0')) as pool_addressesFROM all_tradesGROUP BY 1order by 3 desc