Hi all!
In this following project, section 3:
link
We’re asked to create a list of the users in hacker news website with more than 200 points (so that we can see the 90-9-1 rule in action).
The proposed solution was:
SELECT user, SUM(score)
FROM hacker_news
GROUP BY user
HAVING SUM(score) > 200
ORDER BY 2 DESC;
With that, I think there might be more simple/elegant solution where we let sql sum up each user’s score by filtering by user & score:
select user, score from hacker_news where score > 200 order by 2 desc;
Am I correct or am I missing a key point?
Both options yield the same output.
Thanks!