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 would you reference column values before and after you have inserted and deleted triggers?
What is a trigger word?
what does the t-sql command ident_incr does? : Transact sql
How many types of keys are there in sql?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
Which is better stored procedure or query?
What is sql injection vulnerability?
What is the difference between alter trigger and drop trigger statements?
What is a scalar value in sql?
What are all the ddl commands?
when MSQL8.0 is in market
How do you declare a variable in pl sql?
What is forward declaration in pl sql?
How do you define a foreign key?
What is secondary key?