What’s the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table?
For example: I have a JOBS table with the column JOB_NUMBER. How can I find out if I have any duplicate JOB_NUMBERs, and how many times they’re duplicated?
Aggregate the column by COUNT, then use a HAVING clause to find values that appear more than once.