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
Can we use view in stored procedure?
What are different types of statements supported by sql?
How can you save or place your msg in a table?
How do I save a stored procedure?
what is msql? : Sql dba
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
How do I run a script in sql developer?
What is substitution variable?
How do I create an index in word?
What is pl sql block structure?
How do I copy a table in sql?
how many sql ddl commands are supported by 'mysql'? : Sql dba
Is sql a backend language?
Are sql database names case sensitive?
what is normalization? : Sql dba