Query Exercise: Finding Sister Locations to Help Each Other - Brent Ozar Unlimited®
For this week’s query exercise, let’s start with a brief query to get a quick preview of what we’re dealing with: SELECT TOP 100 Location, COUNT(*) AS Population, AVG(Reputation) AS AvgReputation FROM dbo.Users GROUP BY Location ORDER BY COUNT(*) DESC; That query has a few problems, but hold that thought for a moment. (You’re going […]
Brent Ozar Unlimited®