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
How do you run a query?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
How to start the command-line sql*plus?
When should I use nosql database?
Does truncate table reset auto increment?
What is an ndf file?
What is view explain with example?
What is sql and explain its components?
What is latest version of sql?
How do I partition in sql?
What is an inconsistent dependency?
what is the difference between truncate and delete statement? : Transact sql
How do you use collections in procedure to return the resultset?
Why do we go for stored procedures?
What is cursor explain with example?