exam questions

Exam 70-461 All Questions

View all questions & answers for the 70-461 exam

Exam 70-461 topic 1 question 241 discussion

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

DRAG DROP -
You use Microsoft SQL Server Management Studio to develop a Microsoft Azure SQL Database instance that will support a purchase order application.
You write the following query:

A partial view of the query results can be seen in the following table.

You must generate a summary report that displays the total number of purchase orders received by each vendor for the following regions: North, East, South,
West, and Central.
You need to write a query that returns the results in the format shown in the following table.

Which three Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-
SQL segments to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: SELECT Vendorname, [North], [East],..FROM SourceTable
Step 2: WITH SourceTable AS..
Step 3: UNPIVOT ..
UNPIVOT carries out almost the reverse operation of PIVOT, by rotating columns into rows.
Reference:
https://docs.microsoft.com/en-us/sql/t-sql/queries/from-using-pivot-and-unpivot

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
lilupv
4 years, 11 months ago
1) with 2) select 3) PIVOT
upvoted 1 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 ...