exam questions

Exam DP-700 All Questions

View all questions & answers for the DP-700 exam

Exam DP-700 topic 1 question 6 discussion

Actual exam question from Microsoft's DP-700
Question #: 6
Topic #: 1
[All DP-700 Questions]

HOTSPOT -
You have a Fabric workspace that contains a warehouse named DW1. DW1 contains the following tables and columns.

You need to create an output that presents the summarized values of all the order quantities by year and product. The results must include a summary of the order quantities at the year level for all the products.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer: A

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
mixonfreddy
Highly Voted 1 month, 4 weeks ago
Selected Answer: A
SELECT YEAR ROLLUP(YEAR(SO.ModifiedDATE), P.Name)
upvoted 6 times
...
clux
Most Recent 2 days, 20 hours ago
1.Year 2. Grouping sets
upvoted 1 times
...
sakis213
2 weeks ago
Question asks for summarized values of all the order quantities by year/product AND year alone , so grouping sets its correct 1.Year 2. Grouping sets
upvoted 2 times
sakis213
1 week, 2 days ago
But ROLLUP performs better for these hierarchical aggregations, it might be better to go with ROLLUP
upvoted 1 times
realexamguru
4 days, 5 hours ago
ROLLUP will add one extra Total row that is not requested in the question, so the only correct answer is grouping sets here.
upvoted 1 times
...
...
...
tomaszstaroszczyk
2 weeks, 4 days ago
SELECT YEAR GROUPING SETS(...) If you use ROLLUP then you will get an extra row that sums up the OrderQty total. This is not requested, ROLLUP returns exactly what we need.
upvoted 3 times
...
robertlavigne
2 weeks, 6 days ago
SELECT YEAR Grouping Sets: Best answer. No extra stuff. Just what we want Cube: Lots of extra combinations. Has a row with the total for all years and all products, and rows with the total for each product for all years. Rollup: Has the unnecessary total of all products and all years Normal Group by: No summary at the year level for all products. https://learn.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql?view=sql-server-ver16
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago