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


Please Help Members By Posting Answers For Below Questions

What are the different ways to optimize a sql query?

482


how to shutdown mysql server? : Sql dba

563


How many disk partitions should I have?

545


How many row comparison operators are used while working with a subquery?

529


Describe types of sql statements?

542






What are the advantages of indexing?

513


Is primary key clustered index?

513


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

743


does sql support programming? : Sql dba

603


what is recursive stored procedure? : Sql dba

523


Is it possible to read/write files to-and-from PL/SQL?

649


What is case function?

591


What is sql injection vulnerability?

493


Can you do multiple joins in sql?

542


What are literals in sql server?

522