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 -> Re: Select record with highest value for field hours from multiple rows

Re: Select record with highest value for field hours from multiple rows

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 01 Sep 2006 11:08:08 -0700
Message-ID: <1157134086.461158@bubbleator.drizzle.com>


willy wrote:
> 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

This is clearly school work. Post your best attempt and we will give you pointers ... not solutions.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Sep 01 2006 - 13:08:08 CDT

Original text of this message

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