I need to select all patients files with duplicated id no for example I have 5 files using same id no and 20 files using same id no ,
I tried the following SELECT statement :
SELECT patient_no , id_no , COUNT(*)
FROM MR_PATIENT_IDS
GROUP BY patient_no , id_no
HAVING COUNT(*) > 1
but the output show only id_no duplicated 2 times and not show the greater than 2
what is the missing in the query ?