| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Efficiency; advanced/future SQL constructs
You solution just needs to be fixed up a little, to take into account the DivisionId.
Here's my shot at it, from your solution:
select employeeID, name from Employee E1 where salary = (select max(salary) from Employee e2 where E2.DivisionId = E1.DivisionId)
(I don't have the original in front of me, so I don't remember if
"DivisionId" is the actual
name of the variable he mentioned. But this should be close enough to get
the concept across.)
--
Regards,
David Cressey
www.dcressey.com
Received on Wed Aug 22 2001 - 07:51:22 CDT
![]() |
![]() |