Monday, December 1, 2014

How to Get Count of Repeated Values From a Table In SQL SERVER

Solution:

SELECT CityName, COUNT(*) CityName
FROM Cities
GROUP BY CityName
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC

No comments:

Post a Comment