I am trying to build a leaderboard page, and I'm having difficulties finding a way to group the entries by Author.
I was able to create a plugin to get the sql sum function in there, but I now need to add a group by Author and order by Score DESC to that.
First steps were taken from here: Ability to SUM() or GROUP BY from the template or ElementCriteriaModel
What I ultimately want is a query that would look like this (very simplified of course):
SELECT author, SUM(content.score) as score FROM content Group By Author Order By score DESC
Is there a way to do this "natively" or do I need to write my own query?