Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent
of the other questions in this series. Information and details provided in a question apply only to that
question.
You create a table by running the following Transact-SQL statement:
You are developing a report that displays customer information. The report must contain a grand total column.
You need to write a query that returns the data for the report.
Which Transact-SQL statement should you run?
Explanation:
Calculate aggregate column through AVG function and GROUP BY clause.
Ho do you get a grand total column from E ? answer should be A but the query is wrong
Agree.
Ref. for GROUPING SETS ()
https://docs.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql
No correct answer
There should be a SUM() instead of AVG() for “grand total”. The answer A is a better choice in my opinion.