select last_name, count(*) total from user_master
group by last_name
having count(*) = 1
This query will find last_name that occurs only once in the table.
so you must usehaving with aggregate functions.
urtrivedi
Nearly a Posting Virtuoso
1,306 posts since Dec 2008
Reputation Points: 257
Solved Threads: 270