SQL query to get duplicate entries from 2 colums
I need a SQL query to get duplicate entries from 2 different columns in the same table. In the example below in the product table, duplicate entries are in the "vpn" and "supp" column.
I only want the entries where the "vpn" is duplicated for the same "supp".
Table: Product
supp vpn
1 abc123
1 abc123
2 125abc
2 125abc
2 25895a
3 148589
4 148589
5 125abc
5 125abc
5 125adv
5 1251bc
i.e. supp 5, has four entries but I only need the first two entries b/c the vpn is duplicated for the same supp. Even though supp 3 and 4 have the same vpn, they are still uniques b/c they have different supp.
|