ORDER BY
SELECT with an ascending ORDER BY
In this exercise we sort employees by first_name in ascending order.
SELECT first_name,last_name,title,address,cityFROM employeesORDER BY first_name ASC;Run in terminal
The query should return 9 rows.
SELECT with an descending ORDER BY
In this exercise we sort employees by first_name in descending order.
SELECT first_name,last_name,title,address,cityFROM employeesORDER BY first_name DESC;Run in terminal
The query should return 9 rows.
SELECT with a ascending and descending ORDER BYs
In this exercise we sort employees by first_name in ascending order and then by last name in descending order.
SELECT first_name,last_nameFROM employeesORDER BY first_name ASC,last_name DESC;Run in terminal
The query should return 9 rows