QuestionQ109

VerifiedRestricting and Sorting Data

Refer to the Exhibit and review the data in the costs table.

Question Image

You need to create a report that shows the IDs of every product in the costs table for which the unit price is at least 25% greater than the unit cost. The details must be displayed in descending order of 25% of the unit cost. You issue this query:

Question Image

Which statement is true about the preceding query?

Explanation

An ORDER BY clause may use an arithmetic expression that is not in the select list, and DESC may be applied to that expression. The predicate returns product IDs 14 and 16, and ordering by unit_cost * 0.25 descending places product 14 before product 16.

Community Discussion

No comments yet. Be the first to start the discussion!