Query editor
withtransfers_in as (select"to" as wallet_address,sum(amount_raw / 1e18) as amount_infrom tokens.transferswhere contract_address = {{token_contract}}and blockchain = '{{blockchain}}'group by "to"),transfers_out as (select"from" as wallet_address,sum(amount_raw / 1e18) as amount_outfrom tokens.transferswhere contract_address = {{token_contract}}and blockchain = '{{blockchain}}'group by "from")selecti.wallet_address,i.amount_in - coalesce(o.amount_out,0) as net_amountfrom transfers_in ileft join transfers_out o on i.wallet_address = o.wallet_addressorder by 2 desc