Users Min Reputation and Posts, but low Votes.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @MinRep DATETIME = convert(int, '##MinimumRep?500##')
DECLARE @MinPostCount DATETIME = convert(int, '##MinPostCount?5##')
DECLARE @MaxVotes DATETIME = convert(int, '##MaxVotes?0##')

SELECT users.id AS [User Link],
	reputation,
	upvotes + downvotes AS Votes,
	count(Posts.id) AS [Posts count]
FROM users
INNER JOIN Posts
	ON users.id = Posts.owneruserid
WHERE upvotes + downvotes <= @MaxVotes
	AND reputation >= @MinRep
GROUP BY users.id,
	reputation,
	upvotes,
	downvotes
HAVING count(Posts.id) >= @MinPostCount
ORDER BY reputation DESC

Enter Parameters

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