Exam DP-600 All QuestionsBrowse all questions from this exam
Question 97

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.

    Correct Answer:

Discussion
clux

GREATEST, COALESCE

woliveiras

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.

72bd3bc

Yes, it seems like there is no correct answer for the second box

PaweuG

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.

Nefirs

answer is correct

7d97b62

Correct Answer GREATEST, COALESCE

OLGIS

SELECT ProductID, GREATEST(ListPrice, WholesalePrice, AgentPrice) AS HighestSellingPrice, COALESCE(AgentPrice, WholesalePrice, ListPrice) AS TradePrice FROM Sales.Products;

taphyoe

MAX COALESCE

taphyoe

correct - GREATEST and COALESCE

neoverma

MAX() accepts one argument; GREATEST() accepts multiple arguments