NOTE: More on sorting and SQL