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 type of join is sql join?
Can we use commit inside a trigger?
What is indexing oracle sql?
What is sql injection vulnerability?
How do you optimize a stored procedure in sql?
what is msql? : Sql dba
How would you pass hints to the sql processor?
Can we join 3 tables in sql?
Does sql backup shrink transaction log?
Can variables be used in sql statements?
Explain exception handling in pl/sql?
List the ways to get the count of records in a table?
What is a function in oracle pl sql?
What are types of exception?
Can we rollback truncate?