write a query to find out the no. of employees whose age is
less than 25 and max of salary for the employees belonging
to a particular department is less than 20000
Answer Posted / nitin umale
SELECT department_id, COUNT(employee_id), MAX(salary)
FROM employees
WHERE MONTHS_BETWEEN(hire_date, SYSDATE) < 25*12
GROUP BY department_id
HAVING MAX(salary) < 20000;
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
Explain the uses of database trigger.
How many row comparison operators are used while working with a subquery?
What port does sql server use?
How to raise user-defined exception with custom sqlerrm ?
What is scope and visibility in PL/SQL?
What is the difference between truncate and drop statements?
What is dml and ddl?
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
Is it possible to link two groups inside a cross products after the cross products group has been created?
Can you do multiple joins in sql?
How do you rank data in sql?
Why we use triggers in mysql?
How does sql profiler work?
Which are the different case manipulation functions in sql?
What is assignment operator in pl sql?