Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Explain the uses of database trigger.

1119


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

1039


What port does sql server use?

1070


How to raise user-defined exception with custom sqlerrm ?

1138


What is scope and visibility in PL/SQL?

1213


What is the difference between truncate and drop statements?

1198


What is dml and ddl?

970


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

1441


Is it possible to link two groups inside a cross products after the cross products group has been created?

1009


Can you do multiple joins in sql?

1056


How do you rank data in sql?

1011


Why we use triggers in mysql?

997


How does sql profiler work?

1023


Which are the different case manipulation functions in sql?

1032


What is assignment operator in pl sql?

1046