Reputation: 385
I have 3 columns email,fname,lname I want to Query to display unique records taking into account it should pick only one records if more than one record exists with same email,same fname and same lname.What should be the Query like?
Upvotes: 0
Views: 1299
Reputation: 18818
select email, lname, fname
from table1
group by email, lname, fname
having count(*) > 1 --only records with duplicates,
--group by will return only one occurance
Upvotes: 2