SQL query to retrieve one record for each Plan from a DB2 Ta
Posted: Wed Sep 10, 2014 12:55 am
I want to retrieve the first record of each dept ID, Please help me design an SQL query for this
Example table is :
Employee Name Dpet ID
John 1800
Rex 1900
Robert 1800
Jeana 2000
Cami 1900
Praveen 2000
Bhanu 1900
My SQL should return the following:
John 1800
Rex 1900
Jeanna 2000
Example table is :
Employee Name Dpet ID
John 1800
Rex 1900
Robert 1800
Jeana 2000
Cami 1900
Praveen 2000
Bhanu 1900
My SQL should return the following:
John 1800
Rex 1900
Jeanna 2000