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
What is sqlite format?
What is pl sql collection?
What is java sql connection?
what is the difference between join and union? : Sql dba
Is left join faster than join?
What is a database? Explain
What is the use of sqlerrd 3?
What is synonyms?
How to write a query to show the details of a student from students table whose
What are the triggers associated with image items?
How sql query is executed?
How subquery works in sql?
what does it mean to have quoted_identifier on? : Sql dba
Differentiate between syntax and runtime errors.
Mention what does the hierarchical profiler does?