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 / pradeep
There is little mistake in Nitin the MONTHS_BETWEEN
(SYSDATE,hiredate)should be stated like this because if we
place hiredate firt the output comes in Negative, so it
gives all record.
select DEPTno,COUNT(EMPno),max(SAL)
from EMP
where (TO_CHAR(sysdate,'yyyy') - TO_CHAR(HIREDATE,'yyyy'))
< 25
GROUP BY DEPTno
having max(sal) < 20000
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
does sql support programming? : Sql dba
Is pl sql different from sql?
Are sql connections encrypted?
How can you create an empty table from an existing table?
Can a table have no primary key?
What is query syntax?
What is the sql query to display the current date?
What is coalesce in sql?
How many sql statements are used?
What is rtm in testing?
What are some predefined exceptions in pl/sql?
Can we rollback delete command?
What is the difference between joins?
How many types of cursors are available in pl/sql?
What are the different parts of a package?