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 |
when a grant option is encountered for a table EMP to a peer sitting beside you who has already having the table of that name (EMP), then what is the result?
What is a View ?
How would you best determine why your MVIEW couldnt FAST REFRESH?
What privilege is needed for a user to insert rows to tables in another schema?
Explain the truncate in oracle?
various types of hints and their usage
Do you know about aggregate functions? What is row num function? Can it be used all databases?
1 Answers Bravura Solutions, Cap Gemini,
What is bind variable in oracle 11g?
candidate key is subset of super key but not vice-verse explain
you are sorting a table using "order by"(descending) clause of a column which contains a null value...whether that row containing null value will come first or last in the output??
which is best institue to learn oracle 11i in ameerpet or maithrivanam or sr nagar please help
How to get a list of all user accounts in the database?