Ordering Columns: Multiple Criteria

SQL: SELECT: Reporting

Separate with a comma. Ordering is prioritized left to right.

SELECT * FROM <table name> ORDER BY <column> [ASC|DESC],
                                    <column 2> [ASC|DESC],
                                    ...,
                                    <column n> [ASC|DESC];

Example:

SELECT * FROM books ORDER BY    genre ASC, 
                                title ASC;

SELECT * FROM books ORDER BY    genre ASC,
                                year_published DESC;

SELECT * FROM users WHERE email LIKE "%@gmail.com" 
                    ORDER BY    last_name ASC,
                                first_name ASC;