以上收益包括75%的作者收益(Author Rewards)和25%的点赞收益(Curation Rewards)。 @dailystats 提供过去7天全网潜在收益前30名的排名 check @dailystats for top 30 daily authors in the last 7 days sorted by potential payout
本文由区块链内容激励网络yoyow(yoyow.org)赞助 This post has been sponsored by yoyow.org
Image Credit: Pixabay.com
@nationalpark in his post has listed the top authors that publish exactly 1 post and earn the most. This SteemSQL tutorial is going to uncover the magic behind the scene thanks to @arcange ‘s hard work on maintaining SteemSQL.
Let’s say we need to limit to those authors by publishing only 1 post (excluding comments), by using this criteria.
1
depth = 0
Then, we need to group author and check if the count of the post is one by having count(1) = 1 i.e. we use having on aggregated fields i.e. author
Then, we just need to sort the result in descending order order by max(total_payout_value) desc because it is only 1 post, you can use max, min or sum which does not make any differences.
select author, max(total_payout_value) "payout" from comments (NOLOCK) where depth = 0 group by author having count(1) = 1 order by max(total_payout_value) desc
as you can see max(total_payout_value) is repeated twice, and unlike MySQL, we can’t customize this field and use it as a variable e.g. payout, However we can do a nested SQL, and rewrite the above:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
select T.author, T.payout from ( select author, max(total_payout_value) "payout", count(1) "count" from comments (NOLOCK) where depth = 0 group by author ) T where T.count = 1 order by T.payout desc
Both queries return the same result:
Confirmed with @arcange, the earnings are SBD not USD, so the figures are slighly different than what you read in @nationalpark ‘s post.
select author, max(total_payout_value) "payout" from comments (NOLOCK) where depth = 0 group by author having count(1) = 1 order by max(total_payout_value) desc
select T.author, T.payout from ( select author, max(total_payout_value) "payout", count(1) "count" from comments (NOLOCK) where depth = 0 group by author ) T where T.count = 1 order by T.payout desc