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



IBM's flagship relational database management system

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

Postby naren_tanneru » 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
naren_tanneru
 
Posts: 1
Joined: Tue Sep 09, 2014 11:58 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post