Query editor
with a as (SELECTdate_trunc('day', block_time) as day,blockchain,tx_from as trader,sum(amount_usd) as volumeFROM dex."trades"WHERE block_time > now() - Interval '30' DayGROUP BY 1, 2, 3)SELECTblockchain,CASEWHEN a.volume >=100000 THEN 'whales'ELSE 'other' END AS size,count(distinct(a.trader))FROM aGROUP BY 1, 2