logo

Crowdly

Browser

Add to Chrome

CC - P2 - Promo 2028

Looking for CC - P2 - Promo 2028 test answers and solutions? Browse our comprehensive collection of verified answers for CC - P2 - Promo 2028 at moodle.myefrei.fr.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Schéma relationnel :

  1. Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)
  2. Department (DepartmentID, DepartmentName, #ManagerID)
  3. Project (ProjectID, ProjectName, StartDate, EndDate, Budget)
  4. Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explication des relations :

  • Employee (EmployeeID) est la clé primaire.
  • Department (DepartmentID) est la clé primaire.
  • Project (ProjectID) est la clé primaire.
  • Employee_Project (#EmployeeID, #ProjectID) est une clé primaire composite (relation plusieurs-à-plusieurs entre Employee et Project).
  • Employee(#DepartmentID) → Department(DepartmentID) : Un employé appartient à un département.
  • Department(#ManagerID) → Employee(EmployeeID) : Un manager est un employé.
  • Employee_Project(#EmployeeID) → Employee(EmployeeID)
  • Employee_Project(#ProjectID) → Project(ProjectID)
QUESTION
Quelle requête affiche les départements ayant plus de 5 employés ?

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;

0%
0%
0%
0%
View this question

Schéma relationnel :

  1. Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)
  2. Department (DepartmentID, DepartmentName, #ManagerID)
  3. Project (ProjectID, ProjectName, StartDate, EndDate, Budget)
  4. Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explication des relations :

  • Employee (EmployeeID) est la clé primaire.
  • Department (DepartmentID) est la clé primaire.
  • Project (ProjectID) est la clé primaire.
  • Employee_Project (#EmployeeID, #ProjectID) est une clé primaire composite (relation plusieurs-à-plusieurs entre Employee et Project).
  • Employee(#DepartmentID) → Department(DepartmentID) : Un employé appartient à un département.
  • Department(#ManagerID) → Employee(EmployeeID) : Un manager est un employé.
  • Employee_Project(#EmployeeID) → Employee(EmployeeID)
  • Employee_Project(#ProjectID) → Project(ProjectID)
QUESTION
Quelle requête affiche le nombre d'employés par département ?

A) SELECT COUNT(*) FROM Employee;

B) SELECT DepartmentID, COUNT(*) FROM Employee;

C) SELECT DepartmentID, COUNT(*) FROM Employee GROUP BY DepartmentID;

D) SELECT DepartmentID, COUNT(*) FROM Employee HAVING COUNT(*) > 1;

View this question

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 selects employees whose salary is greater than all employees in department 2?

A) SELECT * FROM Employee WHERE Salary > ALL (SELECT Salary FROM Employee WHERE DepartmentID = 2);

B) SELECT * FROM Employee WHERE Salary > (SELECT Salary FROM Employee WHERE DepartmentID = 2);

C) SELECT * FROM Employee WHERE Salary > ANY (SELECT Salary FROM Employee WHERE DepartmentID = 2);

D) SELECT * FROM Employee WHERE Salary IN (SELECT Salary FROM Employee WHERE DepartmentID = 2);

0%
0%
0%
0%
View this question

Schéma relationnel :

  1. Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)
  2. Department (DepartmentID, DepartmentName, #ManagerID)
  3. Project (ProjectID, ProjectName, StartDate, EndDate, Budget)
  4. Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explication des relations :

  • Employee (EmployeeID) est la clé primaire.
  • Department (DepartmentID) est la clé primaire.
  • Project (ProjectID) est la clé primaire.
  • Employee_Project (#EmployeeID, #ProjectID) est une clé primaire composite (relation plusieurs-à-plusieurs entre Employee et Project).
  • Employee(#DepartmentID) → Department(DepartmentID) : Un employé appartient à un département.
  • Department(#ManagerID) → Employee(EmployeeID) : Un manager est un employé.
  • Employee_Project(#EmployeeID) → Employee(EmployeeID)
  • Employee_Project(#ProjectID) → Project(ProjectID)

QUESTION

Quelle requête sélectionne les employés dont le salaire est supérieur à tous les employés du département 2 ?

A) SELECT * FROM Employee WHERE Salary > ALL (SELECT Salary FROM Employee WHERE DepartmentID = 2);

B) SELECT * FROM Employee WHERE Salary > (SELECT Salary FROM Employee WHERE DepartmentID = 2);

C) SELECT * FROM Employee WHERE Salary > ANY (SELECT Salary FROM Employee WHERE DepartmentID = 2);

D) SELECT * FROM Employee WHERE Salary IN (SELECT Salary FROM Employee WHERE DepartmentID = 2);

View this question

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 retrieves all employees with a salary greater than 50,000?

A) SELECT * FROM Employee WHERE Salary >= 50000;

B) SELECT Salary FROM Employee WHERE Salary >= 50000;

C) SELECT * FROM Employee HAVING Salary >= 50000;

D) SELECT * FROM Employee GROUP BY Salary >= 50000;

0%
0%
0%
0%
View this question

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 retrieves employees who are not in department 3 or 5?

A) SELECT * FROM Employee WHERE DepartmentID NOT IN (3,5);

B) SELECT * FROM Employee WHERE DepartmentID != (3,5);

C) SELECT * FROM Employee WHERE DepartmentID <> (3,5);

D) SELECT * FROM Employee WHERE DepartmentID NOT ANY (3,5);

View this question

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 returns the average salary of employees?

A) SELECT AVG(Salary) WHERE Employee; 

B) SELECT MEAN(Salary) FROM Employee;

C) SELECT AVG(Salary) FROM Employee GROUP BY Salary;

D) SELECT AVG(Salary) FROM Employee;

View this question

Schéma Relationnel :

  1. Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)
  2. Department (DepartmentID, DepartmentName, #ManagerID)
  3. Project (ProjectID, ProjectName, StartDate, EndDate, Budget)
  4. Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explication des relations :

  • Employee (EmployeeID) est la clé primaire.
  • Department (DepartmentID) est la clé primaire.
  • Project (ProjectID) est la clé primaire.
  • Employee_Project (#EmployeeID, #ProjectID) est une clé primaire composite (relation plusieurs-à-plusieurs entre Employee et Project).
  • Employee(#DepartmentID) RÉFÉRENCE Department(DepartmentID) : Un employé appartient à un département.
  • Department(#ManagerID) RÉFÉRENCE Employee(EmployeeID) : Un manager de département est un employé.
  • Employee_Project(#EmployeeID) RÉFÉRENCE Employee(EmployeeID) : Associe un employé à un projet.
  • Employee_Project(#ProjectID) RÉFÉRENCE Project(ProjectID) : Associe un projet à un employé.
QUESTION
Quelle requête permet d'afficher les employés et le nom de leur département ?

A) SELECT * FROM Employee INNER JOIN Department;

B) SELECT Employee.FirstName, Employee.LastName, Department.DepartmentName FROM Employee JOIN Department ON Employee.DepartmentID = Department.DepartmentID;

C) SELECT FirstName, LastName FROM Employee, Department;

D) SELECT Employee.FirstName, Employee.LastName, Department.DepartmentName FROM Employee RIGHT JOIN Department;

0%
0%
0%
0%
View this question

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

How do you sort employees by salary in descending order?

A) SELECT * FROM Employee ORDER Salary DESC;

B) SELECT * FROM Employee ORDER BY Salary DESC;

C) SELECT * FROM Employee SORT BY Salary DESC;

D) SELECT * FROM Employee GROUP BY Salary DESC;

View this question

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 the number of employees per department?

A) SELECT COUNT(*) FROM Employee;

B) SELECT DepartmentID, COUNT(*) FROM Employee;

C) SELECT DepartmentID, COUNT(*) FROM Employee GROUP BY DepartmentID;

D) SELECT DepartmentID, COUNT(*) FROM Employee HAVING COUNT(*) > 1;

View this question

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