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
What are the different ways to optimize a sql query?
how to shutdown mysql server? : Sql dba
How many disk partitions should I have?
How many row comparison operators are used while working with a subquery?
Describe types of sql statements?
What are the advantages of indexing?
Is primary key clustered index?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
does sql support programming? : Sql dba
what is recursive stored procedure? : Sql dba
Is it possible to read/write files to-and-from PL/SQL?
What is case function?
What is sql injection vulnerability?
Can you do multiple joins in sql?
What are literals in sql server?