ORDER BY keyword is used to sort the data in a recordset.
To sort a result, use an ORDER BY clause
SELECT name, birth FROM pet ORDER BY birth;
The default sort order is ascending, with smallest values first.
To sort in reverse (descending) order, add the DESC keyword to the name of the column you are sorting by:
SELECT name, birth FROM pet ORDER BY birth DESC;
Sort on multiple columns;
Animal in ascending order; birth date within animal type in descending order.
SELECT name, species, birth FROM pet
ORDER BY species, birth DESC;