Query editor
with Holdings as (SELECTsubject,inf.twitterusername as subject_twitter,trader,inf2.twitterusername as trader_twitter,sum(IF(isBuy,CAST(shareAmount AS INT256), - CAST(shareAmount AS INT256)) ) AS holdingsFROM friendtech_base.FriendtechSharesV1_evt_Trade aLEFT JOIN dune.hildobby.dataset_friendtech_profiles inf On inf.address = a.subject--LEFT JOIN dune_upload.friendtech_users inf On inf.address = a.subjectLEFT JOIN dune.hildobby.dataset_friendtech_profiles inf2 On inf2.address = a.traderWHEREshareAmount > CAST(0 AS UINT256) -- Only include valid tradesand trader = {{base_address}}group by 1,2,3,4)select a.*from query_3025674 ainner join holdings b on a.base_address = b.subjectwhere cast(holdings as double) > 0