samedi 23 mai 2015

Issue with the Nested Queries

Hey guys I have been working on this but I am not able solve it. Can any one help me with this please? I tried many ways but couldn't solve it, can anyone help me by using nested queries and just using (GROUP BY, HAVING, SELECT,FROM and WHERE)

(Qs)You would like to know the departments with more than 5 full-­‐time young employees (Age <25) each department has. Calculate the average salary of the employees who work for those departments. This newly calculated field should be named as “AvgSalary and be returned by your query.

Here is the SCHEMA of this.

Employee(EmployeeID:Integer, EmpName: String, Age: Integer, Salary: Real) Department(DeptID: Integer, DeptName:String, Budget: Real, ManagerID: Integer) Works(EmployeeID:Integer, DeptID: Integer, Percent_Time: Integer)

Aucun commentaire:

Enregistrer un commentaire