Quote:
Originally posted by umciggy
select * from emp where salary >
(select salary from emp where age=(select max(age) from emp))
|
That works if only one employee has the max(age), otherwise it will give error:
ORA-01427: single-row subquery returns more than one row
In case there are 2 or more employees with max(age), you could specify the min(salary) or the max(salary):
select * from emp where salary >
(select max(salary) from emp where age=(select max(age) from emp))