exam questions

Exam DP-600 All Questions

View all questions & answers for the DP-600 exam

Exam DP-600 topic 1 question 97 discussion

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

HOTSPOT
-

You have a Fabric warehouse that contains a table named Sales.Products. Sales.Products contains the following columns.



You need to write a T-SQL query that will return the following columns.



How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct answer is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

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
clux
Highly Voted 1 year, 4 months ago
GREATEST, COALESCE
upvoted 28 times
...
7d97b62
Most Recent 1 year, 1 month ago
Correct Answer GREATEST, COALESCE
upvoted 4 times
...
OLGIS
1 year, 2 months ago
SELECT ProductID, GREATEST(ListPrice, WholesalePrice, AgentPrice) AS HighestSellingPrice, COALESCE(AgentPrice, WholesalePrice, ListPrice) AS TradePrice FROM Sales.Products;
upvoted 4 times
...
PaweuG
1 year, 2 months ago
I believe that the 2nd box should be COALESCE, but if you read requirements for TradePrice column, you will realize that actually, COALESCE will not work here. Clearly there's a mistake somewhere.
upvoted 4 times
nappi1
7 months, 2 weeks ago
yeah, the list is inverted, and so is the logic
upvoted 1 times
...
...
woliveiras
1 year, 3 months ago
Greatest is ok; however, if we have all of them present, list price will return first if you use coalesce, which is not what the question requests. The question requests AgentPrice first. I am not sure about Coalesce.
upvoted 3 times
72bd3bc
1 year, 2 months ago
Yes, it seems like there is no correct answer for the second box
upvoted 1 times
...
...
Nefirs
1 year, 3 months ago
answer is correct
upvoted 2 times
...
taphyoe
1 year, 4 months ago
MAX COALESCE
upvoted 1 times
neoverma
1 year, 4 months ago
MAX() accepts one argument; GREATEST() accepts multiple arguments
upvoted 4 times
...
taphyoe
1 year, 4 months ago
correct - GREATEST and COALESCE
upvoted 5 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 ...