SELECT * FROM table_name ORDER BY col1 ASC; -- ASCending is default
SELECT * FROM table_name ORDER BY col1 DESC; -- DESCending
SELECT * FROM table_name ORDER BY col1 DESC, col2; -- col1 DESC then col2 ASC
SELECT * FROM People ORDER BY FirstName DESC, YearOfBirth ASC
Sort by multiple column : ORDER BY column1 DESC, column2
ORDER BY column1 DESC, column2
ORDER BY column1 DESC, column2
-- the ORDER BY is used to sort results in order according to the values of one or more columns:
SELECT title, release_year
FROM films
ORDER BY release_year; -- Ascending (is default)
ORDER BY release_year DESC; -- Descending, add DESC
ORDER BY release_year, title; -- add comma to order on multiple columns
SELECT *
FROM Customers
ORDER BY first_name, age;