exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 56 discussion

Actual exam question from Microsoft's 70-761
Question #: 56
Topic #: 1
[All 70-761 Questions]

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?

A.

B.

C.

D.

E.

F.

G.

H.

Show Suggested Answer Hide Answer
Suggested Answer: E
Calculate aggregate column through AVG function and GROUP BY clause.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
exam_taker5
Highly Voted 5 years, 11 months ago
Should be A. You can get grand totals using grouping sets.
upvoted 23 times
Tazul
5 years, 9 months ago
It will fail, because there is no aggregate function, and TaxIDNumber and DateCreated columns are not included in the grouping sets.
upvoted 9 times
...
...
Ricky7876
Highly Voted 5 years, 1 month ago
The question is asking for a Grand Total Column... Even if there was an aggregator in choice A, that would give a Grand Total Row rather than a Column...
upvoted 10 times
tz_123
5 years ago
Wow at first I thought you were wrong, but then I went back to the exam ref and realized you were right. Thanks for the comment.
upvoted 1 times
...
...
Billybob0604
Most Recent 4 years, 5 months ago
E. does not provdide a grand total meaning no single answer is good.
upvoted 1 times
...
PHaringsNL
4 years, 5 months ago
Tested. Answer is E
upvoted 1 times
...
Andy7622
4 years, 6 months ago
Definitely, it's A because it has ()what means grand total in GROUPING SETS just learned it in 20-761 Course Book ))
upvoted 1 times
...
PHaringsNL
4 years, 7 months ago
Only E gives a proper answer to this question. Although the 2014 is confusing
upvoted 1 times
...
Backy
4 years, 9 months ago
Correct is E Mainly by elimination of other choices A and D, both with incorrect syntax, neither will even compile In choice E GROUP BY CustomerID, FirstName, LastName, Address, DateCreated is effectively GROUP BY CustomerID because CustomerID is the key, meaning AVG(AnnualRevenue) = SUM(AnnualRevenue)
upvoted 1 times
...
Oooo
4 years, 9 months ago
The answer can be A if the second last column has sum as the aggregate function sum(annualrevenue) because how can you use a grouping set if there is no aggregate function. Also avg doesnt give a grand total it gives average (simple) so if the typo or that mistake is ignored the answer is A because in that option only you are going to get grand total and that would be last row(question clearly says the report must contain the grand total)
upvoted 1 times
...
daniel_yes23
5 years, 2 months ago
none of them looks correct, in the select line should be a SUM(AnnualRevenue)
upvoted 7 times
...
Bahalzamon
5 years, 6 months ago
nothing in the question says anything about 2014, that is from the previous question. it looks like some of the answer options are in the incorrect spot, also it looks like A is the correct answer. E also has no "GrandTotal" column
upvoted 3 times
...
dragan
5 years, 9 months ago
A is correct.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...