Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Select record with highest value for field hours from multiple rows

Select record with highest value for field hours from multiple rows

From: willy <w.tadema_at_planet.nl>
Date: 1 Sep 2006 05:34:42 -0700
Message-ID: <1157114082.673859.239160@b28g2000cwb.googlegroups.com>


Hello,

I've got a table with the following columns: EmployeeNumber, Company, Department, Cluster, Job, Hours

There can be multiple records for one EmployeeNumber. An employee can work for multiple companies, for multiple departments within a company, for multiple clusters within a department or can have multiple jobs within a cluster.

So, there can be multiple jobs for a specific combination of EmployeeNumber, Company, Department and Cluster. I want to create a view that selects only one record per EmployeeNumber, Company, Department, Cluster combination. It has to select the job that has the highest value for the field Hours.

How can I do that?

Kind regards,

Willy Tadema Received on Fri Sep 01 2006 - 07:34:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US