Exam DP-600 Topic 1 Question 92 Discussion
Actual exam question for Microsoft's DP-600 exam
Question #: 92
Topic #: 1
Question #: 92
Topic #: 1
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.


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.

Suggested Answer:

Explanation:
For the HighestSellingPrice, y ou should use the GREATEST function to find the highest value from the given price columns. However, T-SQL does not have a GREATEST function as found in some other SQL dialects, so you would typically use a CASE statement or an IIF statement with nested MA X functions.
Since neither of those are provided in the options, you should select MAX as a placeholder to indicate the function that would be used to find the highest value if combining multiple MAX functions or a similar logic was available.
For the Trad ePrice, you should use the COALESCE function, which returns the first non-null value in a list.
The COALESCE function is the correct choice as it will return AgentPrice if it ' s not null; if AgentPrice is null, it will check WholesalePrice , and if that is also null, it will return ListPrice .
The complete code with the correct SQL functions would look like this:
SELECT ProductID,
MAX(ListPrice, WholesalePrice, AgentPrice) AS HighestSellingPrice, -- MAX is used as a placeholder COALESCE(AgentPrice, WholesalePrice, ListPrice) AS TradePrice FROM Sales.Products Select MAX for HighestSellingPrice and COALESCE for TradePrice in the answer area.
by Horace at May 13, 2026, 11:49 PM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).