Query editor
-- Sheep - 0x3ee9eda7d7ae365b47be8bfe67e07e27522aaf6a-- gatien - 0x1f5b68b914f7ad1afca4528b357827def2500f38-- bit - 0x1f5b68b914f7ad1afca4528b357827def2500f38--bitgoden - 0xa8ba11db2901905c6ab49c1c86e69fd22081f68a-- saudi - 0x1b546a13875c83db8bab7ea4df760b13019a976c-- heisen - 0x9c1c9027f2e9194f00f8f732de9f36fdc1e225d6-- oh and cbb - 0xf0a5a3b09a919c7fe826ea0d9482e8d377952821with Holdings as (SELECTsubject,get_href('https://www.friend.tech/rooms/' || CAST(subject AS varchar), coalesce(inf.twitterusername, 'New Account') ) 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 in (0x3ee9eda7d7ae365b47be8bfe67e07e27522aaf6a,0x1f5b68b914f7ad1afca4528b357827def2500f38,0xa8ba11db2901905c6ab49c1c86e69fd22081f68a,0x1b546a13875c83db8bab7ea4df760b13019a976c,0x9c1c9027f2e9194f00f8f732de9f36fdc1e225d6,0xf0a5a3b09a919c7fe826ea0d9482e8d377952821)and subject not in (0x3ee9eda7d7ae365b47be8bfe67e07e27522aaf6a,0x1f5b68b914f7ad1afca4528b357827def2500f38,0xa8ba11db2901905c6ab49c1c86e69fd22081f68a,0x1b546a13875c83db8bab7ea4df760b13019a976c,0x9c1c9027f2e9194f00f8f732de9f36fdc1e225d6,0xf0a5a3b09a919c7fe826ea0d9482e8d377952821)group by 1,2,3,4)selectcount(subject) as holding_count,subject_twitterfrom holdingswhere cast(holdings as double) >0group by 2order by 1 desc-- select-- evt_block_time-- ,trader-- ,inf.twitterusername as trader_twitter-- from friendtech_base.FriendtechSharesV1_evt_Trade a-- LEFT JOIN dune.hildobby.dataset_friendtech_profiles inf On inf.address = a.trader-- where 1=1-- and subject = 0xe1affc1256e18a9f88d757427a56fe17164040b7-- and evt_block_time <= timestamp '2023-09-22 17:59'-- and isbuy