We can use the ORDER BY keyword to sort result-sets by one or more columns.
We can see in this example, that not specifying the order method, the output is automatically sorted by id in ascending order.
We can change the order to descendiing by using the DESC keyword.
ORDER BY id DESC
We can sort by multiple columns by specifying the column names, separated by a coma.
ORDER BY firstname, lastname
Here, we sort by the firstname column first, followed by the lastname column.