Valid 1z0-071 Dumps shared by ExamDiscuss.com for Helping Passing 1z0-071 Exam! ExamDiscuss.com now offer the newest 1z0-071 exam dumps, the ExamDiscuss.com 1z0-071 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1z0-071 dumps with Test Engine here:
Examine this statement: SELECT last name FROM employees ORDER BY CASE WHEN salary = (SELECT MAX(salary) FROM employees) THEN 'A' ELSE last_ name END ,last_name DESC; Which two statements are true?
Correct Answer: B,E
The ORDER BY clause with a CASE statement allows for conditional sorting based on the results of the CASE expression. A). This is not true, as the 'A' in the THEN clause would cause the employees earning the maximum salary to be sorted at the top, but it does not determine the order in which their last names would appear. B). This is true, the 'A' in the THEN clause will result in all maximum salary earners to be sorted at the top, and since 'A' comes before any last names alphabetically, they will be in ascending order. C). This is not true, as the ELSE clause sorts the remaining employees by last_name but does not specify an order; hence, it defaults to ascending which contradicts the second part of the ORDER BY clause which specifies DESC. D). This is not true, as the order of the remaining employee names is specified by the ORDER BY clause, which states last_name DESC. E). This is true, after the employees with the maximum salary are sorted, the remaining employees' names will appear in descending order due to the last_name DESC in the ORDER BY clause. F). This statement is not true as the specified 'A' in the CASE statement provides a definite order for employees earning the maximum salary. References: * Oracle Database SQL Language Reference, 12c Release 1 (12.1): "ORDER BY Clause" * Oracle Database SQL Language Reference, 12c Release 1 (12.1): "CASE Expression"