consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.
Answer Posted / abhishekjaiswal
select last_name,salary from employees where (salary,department_id) in ( select max(salary),
department_id from employees where department_id in (10,20) group by
department_id)
/
Output
LAST_NAME SALARY
------------------------- ----------
Hartstein 13000
Whalen 4400
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is #table in sql?
What is the difference between left join and right join?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
What packages(if any) has oracle provided for use by developers?
What are pl/sql cursors?
What are the different schemas objects that can be created using pl/sql?
How can the performance of a trigger be improved?
Define SQL and state the differences between SQL and other conventional programming Languages?
How does cross join work?
What is a left inner join?
What are pl sql procedures?
Can a trigger call a stored procedure?
Explain unique key in sql.
What is compilation error in pl sql?
How do you modify a trigger?