Very Easy

Order students by id (descending)

Select all columns and rows from the students table, and sort the results by student_id in descending order.

TABLES

students

+------------+------------+-----------+-----+------------+
| student_id | first_name | last_name | age | class_code |
+------------+------------+-----------+-----+------------+
| 1          | Mike       | Chaplin   | 12  | 7A         |
| 2          | Emily      | Jackson   | 12  | 7A         |
| 3          | Robert     | Jackson   | 12  | 7A         |
| ...        | ...        | ...       | ... | ...        |
+------------+------------+-----------+-----+------------+
EXPECTED OUTPUT
+------------+------------+-----------+-----+------------+
| student_id | first_name | last_name | age | class_code |
+------------+------------+-----------+-----+------------+
| 75         | Carol      | King      | 13  | 8B         |
| 74         | Gordon     | Gazelle   | 12  | 8B         |
| 73         | David      | Gorilla    | 12  | 8B         |
| ...        | ...        | ...       | ... | ...        |
+------------+------------+-----------+-----+------------+

Use SELECT * FROM table1 ORDER BY col1 DESC to select all rows from a table table1 and order them by col1 in descending order.

SELECT * FROM students ORDER BY student_id DESC

  • This field is required.