Skip to content
Advertisement

Rows with duplicate column values

I am pretty sure there are rows with duplicate column values in the table:

enter image description here

And I am trying to count the number of rows with the duplicated ReferralID:

enter image description here

But getting empty result set.

Thanks for your help.

Advertisement

Answer

You are grouping by a number of non-unique columns (TenancyReferralKey, FromDate, ToDate, ToDate_Value). If you remove those you will receive the duplicates you are after e.g.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement