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 multiple columns?
Is null operator in sql?
what is bdb (berkeleydb)? : Sql dba
What is sql in java?
What are different types of tables in sql?
what is data control language? : Sql dba
What is difference between primary and secondary key?
What are the limitations of sql express?
what are the authentication modes in sql server? How can it be changed? : Sql dba
what is oracle database ? : Sql dba
Does sqlite need a server?
Explain foreign key in sql?
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
What is auto increment feature in sql?
What is sql rowcount?