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
Explian rowid, rownum? What are the psoducolumns we have?
What do we need to check in database testing?
How do you sort in sql?
What are the different types of dbmss?
What is database migration?
what are the properties and different types of sub-queries? : Sql dba
how can we find the number of rows in a table using mysql? : Sql dba
Can we rollback after truncate?
how would you enter characters as hex numbers? : Sql dba
What is a call statement? Explain with an example.
What does the file extension accdb stand for?
What is clustered index in sql?
What are the three pl sql block types?
How do you declare a variable in pl sql?
What is the reports view in oracle sql developer?