Query editor
with reward_wallets as (select distinct wallet from dune_user_generated."alcx_transactions"where rewards > 0)selectdate_trunc('month', evt_time)::DATE--t.wallet--, wallet_label, sum(amt) as alcx_bal, sum(rewards) as rewards, sum(trades) as trades, case when sum(rewards) > 0 then sum(trades) / sum(rewards) * - 1 end as "% sold", sum(staking) as staking, sum(amt_slp) as slp, sum(other) as otherfrom dune_user_generated."alcx_transactions" tjoin reward_wallets rwon rw.wallet = t.walletwhere wallet_label ISNULL --exclude project walletsgroup by 1order by 1