Select rows from table that have only one occurrence of a value
312061Jan 8 2007 — edited Jan 8 2007Hello,
I am new to SQL.
I am trying to select rows from a table which has only 1 occurrence of the surname. Example of rows in my table. It has 3 columns, SURNAME, CLIENT_ID, SECTOR
SURNAME CLIENT_ID SECTOR
ABBOT 12345 A
ABBOT 45679 B
ABBEY 123456 A
CASEY 98 A
The query I am trying to write should only bring back the last 2 rows from the example shown above. How do Write my query ? Any help would be appreciated. Thanks in antcipation.
Mukesh