You work for MDFT Pro, a well-known training agency. You have been asked to analyze the student Registration data in your Microsoft Fabric workspace that contains a warehouse named TrainingWarehouse. The warehouse contains the following data:
Table name | Column name | Data type |
---|---|---|
Student | StudentID | Int |
Student | StudentName | Varchar(128) |
Registration | StudentID | Int |
Registration | RegistrationType | Varchar(64) |
Registration | StartDate | Datetime2 |
You need to create a T-SQL statement that will denormalize the tables and includes the RegistrationType attribute in the results. The solution must meet the following requirement:
You have the following T-SQL query:
WITH result AS(
SELECT
s.StudentID,
s.StudentName,
r.RegistrationType
FROM Student AS s
LEFT OUTER JOIN Registration AS r ON r.StudentID = s.StudentID
)
SELECT COUNT(DISTINCT StudentID) AS TotalStudents, RegistrationType
FROM result
GROUP BY RegistrationType
_____________ COUNT(DISTINCT StudentID) > 2
How should you complete the statement?
Choose the correct answer from the options below.
Explanations for each answer: