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

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

SELECT TOP 1000
    u.Id,
    u.Reputation,
    u.CreationDate,
    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.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