Q&A for users and developers of the Cardano cryptocurrency ecosystem
SELECT u.DisplayName, u.Id AS UserId, COUNT(c.Id) AS TotalComments, SUM(c.Score) AS TotalUpvotes FROM comments c JOIN users u ON c.UserId = u.Id GROUP BY u.DisplayName, u.Id ORDER BY u.Id;