Query editor
with buys as (select tx_from as taker, -sum(amount_usd) as amount, count(*) as transactionsfrom dex.tradeswhere block_time > date('2023-01-01')group by tx_from),sells as (select tx_to as taker, sum(amount_usd) as amount, count(*) as transactionsfrom dex.tradeswhere block_time > date('2023-01-01')group by tx_to),contracts as (select addressfrom labels.addresseswhere category = 'contracts')select taker, sum(amount)from (select *from buysunionselect *from sells)where taker not in (select address from contracts)group by takerhaving sum(amount) > 50000 and sum(transactions) < 10000 and sum(transactions) > 50order by sum(amount) desc