Query editor
withbuy as (select distinct trader_id, sum(amount_usd) as boughtfrom dex_solana.tradeswheretoken_bought_mint_address = 'AN4KfBxJ7VBZ4ijai2kn5F6CUfoi2ZEoD1jT52rJpump'and block_time > (current_date - interval '30' day)and amount_usd > 999group by trader_id), sell as (select distinct trader_id, sum(amount_usd) as soldfrom dex_solana.tradeswheretoken_sold_mint_address = 'AN4KfBxJ7VBZ4ijai2kn5F6CUfoi2ZEoD1jT52rJpump'and block_time > (current_date - interval '30' day)group by trader_id)select b.trader_id, b.boughtfrom buy bleft join sell son s.trader_id = b.trader_idwhere s.sold is nullorder by b.bought desc