All pastes #387421 Raw Edit

Unnamed

public sql v1 · immutable
·published 2007-03-09 10:48 UTC
rendered paste body
	SELECT TOP (@max_return)		[location_id],		COUNT(DISTINCT location_id)	FROM		[CheggpostItems]	WHERE		deleted = 0		AND		isPosted = 1	GROUP BY		location_id	ORDER BY		COUNT(DISTINCT location_id) DESC