Page 1 of 1

SQL query to retrieve one record for each Plan from a DB2 Ta

PostPosted: Wed Sep 10, 2014 12:55 am
by naren_tanneru
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