You work for MDFT Pro, a well-known training agency. The company has a Fabric warehouse that contains two tables named DimDate and Graduation.
DimDate contains the following fields:
Name | DataType | Description |
---|---|---|
DateID | Date | Unique identifier for the date |
IsHoliday | Bit | Used to denote that the date is a statutory holiday |
Graduation contains the following fields:
Name | DataType | Description |
---|---|---|
gradID | Integer | Graduation record identifier |
pointsScored | Integer | Points scored in final exam |
dateID | Date | Date of graduation |
You need to compare the average points scored by students who took their final exams on statutory holidays versus non-statutory holidays.
You have the following T-SQL query:
SELECT
d.IsHoliday,
(sum(g.pointsScored) / count(g.gradID)) AS AvgPoints
FROM Graduation g
INNER JOIN DimDate d on g.dateID = d.DateID
_______________
How should you complete the query?
Choose the correct answer from the options below.
Explanations for each answer: