Follow the leader | Stalking all accounts that someone else follows using @emrebeyler's Hivemind

in hivemind •  6 months ago 

Hivemind SQL by @emrebeyler. Just queried all accounts that @teamaustralia is following.

Just over a couple of weeks ago, @emrebeyler was kind enough to give me access to his Hivemind database instance. It's basically access to a read-only PostgreSQL database of a Hivemind instance. I had a poke around the tables when I first got my credentials but its taken only until now to find a practical use for it.

If you follow my blog (or have come across my posts), you'll know that I'm from Australia. Fellow Aussie, @ausbitbank, sponsored me through his @centerlink account not long after I joined Steem. Over time, I got to know and follow other Aussies on Steem and I was informed that the @teamaustralia account probably follows all the known Aussies to date. Not too long ago, I snapped up the @teamstraya account as a test curation account with leased Steem Power (a separate post on this later!). What better way to test curation than on my fellow #teamaustralia members? It's currently trailing the @centerlink account.

Now onto the Hivemind! I want @teamstraya to follow all the accounts @teamaustralia is following. I think this query achieves it (please correct me if I'm wrong...and it's probably not the most efficient query either!):

FROM   hive_accounts 
WHERE  id IN (SELECT following 
              FROM   hive_follows 
              WHERE  follower = (SELECT id 
                                 FROM   hive_accounts 
                                 WHERE  NAME = 'teamaustralia')) 

Now for the quick-and-nasty way to follow all the accounts using steem-js:

// query => populate accounts array

followAccounts( accounts );

var i = 0;
function followAccounts( accounts )
  setTimeout( function() {

    var json = JSON.stringify(
          follower: acc,
          following: accounts[i],
          what: [ 'blog' ]

    Steem.broadcast.customJson( myKey, [], [acc], 'follow', json, function( err, result ) {
      console.log( err, result );
    } );

    if( i < accounts.length )
      followAccounts( accounts );

  }, 3000 );

The @teamstraya SteemWorld is spammed with Follow Account operations now :P

And...finished! Mission accomplished!

Do you have any requests for stats that I could try pulling out from the Hivemind database? Let me know in the comments.

Yours truly,

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Cool use case. It’s possible to bundle multiple follows into just one custom_json op afaik. It might be a little cost effective:)

Thanks! Cool, I'll investigate that for the next account I stalk. I think it ended up costing 5% RCs in total :P

Congratulations @contrabourdon, your post successfully recieved 0.317115 TRDO from below listed TRENDO callers:

@amico earned : 0.21141 TRDO curation

To view or trade TRDO go to
Join TRDO Discord Channel or Join TRDO Web Site

An interesting initiative.

@tipu curate
@giphy curate 100

A huge hug from @amico! 🤗

#sbi-skip !trdo

Congratulations @amico, you successfuly trended the post shared by @contrabourdon!
@contrabourdon will receive 0.31711500 TRDO & @amico will get 0.21141000 TRDO curation in 3 Days from Post Created Date!

"Call TRDO, Your Comment Worth Something!"

To view or trade TRDO go to
Join TRDO Discord Channel or Join TRDO Web Site

Upvoted 👌

Powered by witness untersatz!
Current VP: 69.3%

Thank you for supporting @CatsMakeKittens by being a part of our community @contrabourdon.

Each CATS you purchase gets you daily upvotes from me @CatScientist as our community grows so do your rewards for being a member!

@tipu curate 2

Upvoted 👌 (Mana: 10/35 - need recharge?)

You have received a 2.51% upvote based on your stake of 2010.01037432 UFM!

for you



@cecilian 粥粥 迎着台风 坐着高铁 给您送来

吃饱了吗?跟我猜拳吧! 石头,剪刀,布~


Hey @contrabourdon, here is a little bit of BEER from @eii for you. Enjoy it!

Join Steem Power Up Day at the 1. of December and power up BEER

This post has received a 3.13 % upvote from @drotto thanks to: @sbi-booster.