In @nationalpark ‘s post, a few whale’s outgoing votes have been analysed. As we know, all the voting data have been recorded in Steem SQL’s TxVotes where it has the following structure:
The input is the Big whale’s ID voter and we can group the results by author, count and sum the weights up, like this:
1 2 3 4 5 6 7 8 9 | select author, count(1) "Count", sum(weight) "Total Weights", sum(weight)/count(1) "Average Weight" from TxVotes where voter = 'abit' group by author order by sum(weight) desc |
select author, count(1) "Count", sum(weight) "Total Weights", sum(weight)/count(1) "Average Weight" from TxVotes where voter = 'abit' group by author order by sum(weight) desc
The SQL will look for all historic votes made by @abit and here are the first 1000 items.
We can also add the timestamp restraints (in the where statement) for example, for the last 7 days.
1 | and datediff(day, timestamp, GetUTCDate()) between 0 and 7 |
and datediff(day, timestamp, GetUTCDate()) between 0 and 7
We can also add select top 10 if you are only interested in the first 10 authors.
We can also sort the results by total number of votes order by count(1) instead of total voting weight.
We can also add having count(1) >= 5 to show the authors that gain at least 5 votes.
You may also like: STEEMSQL 系列之大鱼们都给谁投票了?
STEEM SQL Tutorial
- SteemSQL Tutorial: How to Get Random Posts on SteemIt?
- SteemSQL Tutorial: How to Get Authors Order By Potential Payout in Last 7 days?
- SteemSQL Tutorial: How to Get Historic Posts of Today on SteemIt?
- SteemSQL Tutorial: How to Calculate Monthly Income on STEEMIT?
- SteemSQL Tutorial: Can we Really Recover Deleted Comments/Posts on STEEMIT?
- SteemSQL Tutorial: What are the Outgoing Votes for Big Whales?
- SteemSQL Tutorial: Count Total Interests Sent
- SteemSQL Tutorial: Finding Inactive Steemians that You Follow
- SteemSQL Tutorial: How to Fix “JSON text is not properly formated. Unexpected character ‘.’ is found at position 0.”?
- SteemSQL Tutorial: How to Get the Most Payout Authors in History?
- SteemSQL Tutorial: Get Most Single Payout Authors
- SteemSQL Tutorial: How to Avoid SQL Injection?
- SteemSQL Tutorial: I have spent 800 SBD (7000+ USD) buying votes!
- SteemSQL Tutorial: How to Check If SteemSQL is Synchronized with Steem Blockchain?
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: How am I doing with SteemIt Curation Bot?
Next Post: SteemIt: Javascript Function to Get Original Post from Comment's PermLink