Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
SELECT v.UserId, COUNT(*) AS FavoriteCount FROM Votes v JOIN Posts p ON p.id = v.PostId WHERE p.OwnerUserId = 12345678 AND v.VoteTypeId = 5 -- (Favorites vote) GROUP BY v.UserId ORDER BY FavoriteCount DESC;