When you query data from a table, PostgreSQL returns the rows in the order that they were inserted into the table
ORDER BY - allows you to sort the rows returned from SELECT in ascending or descending order based on criteria specified — SELECT col1, col2
FROM table
ORDER BY col1 ASC / DESC
(ASC by default)
order by multiple columns
ORDER BY col1 ASC, col2 DESC
like calling ORDER BY on an ordered rows (makes a difference if the rows were the same values)