Unnamed
public sql v1 · immutable 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 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