SELECT TOP 1000 u.Id, u.Reputation, u.CreationDate, u.Dis...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

SELECT TOP 1000
    u.Id,
    u.Reputation,
    u.CreationDate,
    u.DisplayName,
    u.LastAccessDate,
    u.Views,
    u.UpVotes,
    u.DownVotes,
    COUNT(p.Id) AS PostCount,
    AVG(p.Score) AS AvgPostScore
FROM 
    Users u
LEFT JOIN 
    Posts p ON u.Id = p.OwnerUserId
WHERE 
    u.LastAccessDate > DATEADD(month, -3, GETDATE())
GROUP BY 
    u.Id, u.Reputation, u.CreationDate, u.DisplayName, u.LastAccessDate, u.Views, u.UpVotes, u.DownVotes
ORDER BY 
    u.LastAccessDate DESC

Enter Parameters

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