How to display employee records who gets more salary than the average salary in the department?
Answer / Kavita Saini
To display employee records who get more salary than the average salary in a department, you can use SQL subqueries and analytic functions. Here's an example using Oracle SQL:nn```sqlnSELECT * FROM employeesnWHERE salary > (SELECT AVG(salary) FROM employees WHERE department_id = employees.department_id);n```
| Is This Answer Correct ? | 0 Yes | 0 No |
why dont we assign not null constraint as table level constraint.
How many different types of indexes we have in oracle?
24 Answers IBM, TCS,
How to use "if" statements on multiple conditions?
i want to know about mr.b.kotravel......who has answered for second maxmium salary from employee table
difference between truncate and delete ,drop?
What is the difference between post-database commit and post-form commit?
find out first highest salary?
10 Answers Verinon Technology Solutions,
How to turn on or off recycle bin for the instance?
What suggestions do you have to reduce the network traffic?
How to define an anonymous block?
Will the Optimizer always use COST-based approach if OPTIMIZER_MODE is set to "Cost"?
What are synonyms used for ?