Q&A for users and developers of the Cardano cryptocurrency ecosystem
SELECT TOP 500 P.OwnerUserId AS UserId, COUNT(P.Id) AS TotalPosts, AVG(P.Score) AS AvgPostScore, AVG(CAST(U.Views as Bigint)) AS TotalViews, AVG(U.UpVotes) AS TotalUpVotes, AVG(U.DownVotes) AS TotalDownVotes, DATEDIFF(DAY, U.CreationDate, GETDATE()) AS AccountAge FROM Posts P JOIN Users U ON P.OwnerUserId = U.Id WHERE P.OwnerUserId IS NOT NULL GROUP BY P.OwnerUserId, U.CreationDate ORDER BY rand(P.OwnerUserId);