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