SELECT TOP 1000 u.Reputation, u.CreationDate, u.DisplayNa...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cardano Meta

Q&A for users and developers of the Cardano cryptocurrency ecosystem

SELECT TOP 1000 
    u.Reputation,
    u.CreationDate,
    u.DisplayName,
    u.LastAccessDate,
    u.WebsiteUrl,
    u.Location,
    u.AboutMe,
    u.Views,
    u.UpVotes,
    u.DownVotes,
    COUNT(p.Id) AS TotalPosts,
    AVG(p.Score) AS AveragePostScore,
    SUM(p.Score) AS TotalVotes,
    DATEDIFF(DAY, u.CreationDate, GETDATE()) AS AccountAge
FROM users u
LEFT JOIN posts p ON u.id = p.OwnerUserId
GROUP BY u.Reputation, u.CreationDate, u.DisplayName, u.LastAccessDate, u.WebsiteUrl, 
         u.Location, u.AboutMe, u.Views, u.UpVotes, u.DownVotes, u.id
ORDER BY NEWID();  -- Randomly orders the rows

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results