I have a table like below
SUBJECT Years MARKS
AB 1 20
AB 1 25
AC 1 20
AC 1 30
AC 1 40
AD 1 20
I only need count of duplicates (subject||Year), expected answer is 2
and not
AB1 -- 2
AC1 -- 3
That would be one more query on top of the duplicates query…
will give you all the results with counts. Another count over this..
should give you the number of records which have one or more duplicates.