I searched a lot about sorting elements by sum of votes (in another model), like I do in SQL here :
SELECT item.* FROM item
LEFT JOIN (
SUM(vote.value) AS vote.rating
GROUP BY vote.item
) AS res ON item.id = vote.item
ORDER BY res.rating DESC
I think you can't do the left join with simple waterline methods, but you can use the .query method to execute your raw SQL syntax.