Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation
---by changing the parameter you decide how the users are divided into groups ---for example, if rep=10, we're looking at users with 0 to 9 points, users with 10 to 19 points, etc. ;with repgroups_cte AS ( SELECT Id AS uid, CAST(reputation/##rep?100## AS int) AS rep FROM Users WHERE (Reputation>=##min?125##) ) SELECT rep, COUNT(uid) AS [Count] FROM repgroups_cte GROUP BY rep ORDER BY rep DESC