logo

Crowdly

Browser

Add to Chrome

Relational Schema: Employee  (EmployeeID, FirstName, LastName, Email, Phone, Hi...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Relational Schema:

Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)

Department (DepartmentID, DepartmentName, #ManagerID)

Project (ProjectID, ProjectName, StartDate, EndDate, Budget)

Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explanation of Relationships:

  • Employee (EmployeeID) is the primary key.
  • Department (DepartmentID) is the primary key.
  • Project (ProjectID) is the primary key.
  • Employee_Project (#EmployeeID, #ProjectID) is a composite primary key (many-to-many relationship between Employee and Project).
  • Employee(#DepartmentID) REFERENCES Department(DepartmentID): An employee belongs to a department.
  • Department(#ManagerID) REFERENCES Employee(EmployeeID): A manager is an employee.
  • Employee_Project(#EmployeeID) REFERENCES Employee(EmployeeID)
  • Employee_Project(#ProjectID) REFERENCES Project(ProjectID)
QUESTION
Which query displays departments with more than 5 employees?

A) SELECT DepartmentID FROM Employee WHERE COUNT(*) > 5;

B) SELECT DepartmentID, COUNT(*) FROM Employee GROUP BY DepartmentID HAVING COUNT(*) > 5;

C) SELECT DepartmentID, COUNT(*) FROM Employee HAVING COUNT(*) > 5;

D) SELECT DepartmentID FROM Employee GROUP BY DepartmentID;

More questions like this

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome