exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 135 discussion

Actual exam question from Microsoft's 70-761
Question #: 135
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 have a database that contains several connected tables. The tables contain sales data for customers in the United States only.
You need to create a query that generates sample data for a sales table in the database. The query must include every product in the inventory for each customer.
Which statement clause should you use?

  • A. GROUP BY
  • B. MERGE
  • C. GROUP BY ROLLUP
  • D. LEFT JOIN
  • E. GROUP BY CUBE
  • F. CROSS JOIN
  • G. PIVOT
  • H. UNPIVOT
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Reference:
https://docs.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql?view=sql-server-2017

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
Dieter
Highly Voted 5 years, 8 months ago
According to the hints "each product for each customer" it seems to be a Cartesian product required here. Agree?
upvoted 34 times
supermario
5 years, 2 months ago
Agreee. The key words every product every customer directs you to CROSS JOIN. To generate test data. Nothing to think much.
upvoted 5 times
...
HA2020
4 years, 6 months ago
agree, also, they want us to 'create a query that generates sample data'..that is usually Cartesian product.
upvoted 2 times
...
...
safiullah
Highly Voted 5 years, 8 months ago
I also agree with Dieter. This seems that each product of each customer. Seems like a cartesian product and therefore a cross join.
upvoted 6 times
...
Vermonster
Most Recent 4 years, 4 months ago
CROSS JOIN - you are inserting sample records, not an aggregation of data. CROSS JOIN with Products to make sure every product makes it into the sample
upvoted 1 times
...
Backy
4 years, 8 months ago
The question is worded improperly. There are only two sets of choices, grouping or joining. The problem with grouping is that there are 3 equivalent choices for grouping. Any of A,C,E, will "include" it. There are two choices for joining, D and F. Since the question deals only with one table Sales, D is unlikely. So the best answer is F even though it makes little sense
upvoted 1 times
...
Jiacheng
5 years, 2 months ago
I think the answer is correct, because you don't know if there is aggregation function for Customer, only use Cross Join cannot make sure on that. but grouping rollup, even if they are unique records, still does't affect
upvoted 1 times
...
raja1234567890
5 years, 6 months ago
I agree with Dieter.
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