Order by

The ORDER BY Statement used to order the result-set in ascending or descending order by one or more arguments.

SELECT author_name, author_email FROM commits ORDER BY author_name
SELECT author_name, author_email FROM commits ORDER BY author_name, author_email
SELECT author_name, author_email FROM commits ORDER BY author_email, commit_id ASC
SELECT author_name, author_email FROM commits ORDER BY author_name DESC
SELECT author_name, author_email FROM commits ORDER BY author_name, LEN(author_name)

The ORDER BY Statement with USING <operator> syntax inspired by PostgreSQL

SELECT author_name, author_email FROM commits ORDER BY author_email, commit_id USING <
SELECT author_name, author_email FROM commits ORDER BY author_name USING >

You can define nulls order policy to set if you want null value to be first or last in the order

SELECT author_name, author_email FROM commits ORDER BY author_email NULLS FIRST
SELECT author_name, author_email FROM commits ORDER BY author_name NULLS LAST