Skip to content

Instantly share code, notes, and snippets.

@nucknorris
Created June 11, 2013 12:24
Show Gist options
  • Save nucknorris/5756409 to your computer and use it in GitHub Desktop.
Save nucknorris/5756409 to your computer and use it in GitHub Desktop.
SQL
SELECT YourColumn, COUNT(*) TotalCount
FROM YourTable
GROUP BY YourColumn
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment