Multiple choice technology databases

Given the following query: SELECT last_name, first_name, age, hire_date FROM employee WHERE age > 40 Which of the following clauses must be added to return the rows sorted by AGE, oldest first, and by LAST_NAME, from A to Z?

  1. SORT BY age ASC, last_name

  2. SORT BY age DESC, last_name

  3. ORDER BY age DESC, last_name

  4. ORDER BY age ASC, last_name

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Sorting rows in SQL requires the ORDER BY clause, making SORT BY options incorrect. To sort by age with the oldest first, the age column must use descending order (age DESC). To sort by last name alphabetically, ascending order is used, which is the default in SQL.