Examine the description of the ORDER_ITEMS table:

Examine this incomplete query:
SELECT DISTINCT quantity * unit_price total_paid FROM order_items ORDER BY <clause>; Which two can replace <clause> so the query completes successfully?
Correct Answer: B,E
In a SELECT statement with DISTINCT, the ORDER BY clause can only order by expressions that are part of the SELECT list.
A). quantity alone is not sufficient to replace <clause> as it is not included in the SELECT list after DISTINCT.
B). This option can successfully replace <clause> because both quantity and unit_price are used in the SELECT expression, and thus their individual values are valid for the ORDER BY clause.
C). total_paid is an alias for the expression quantity * unit_price, but it cannot be used in the ORDER BY clause because Oracle does not allow aliases of expressions in DISTINCT queries to be used in ORDER BY.
D). product_id is not included in the SELECT list after DISTINCT and thus cannot be used in ORDER BY.
E). The expression quantity * unit_price is exactly what is selected, so it can replace <clause> and the query will complete successfully.
References:
* Oracle Database SQL Language Reference, 12c Release 1 (12.1): "ORDER BY Clause"