Skip to main content
SQL โ€ข LESSON 53

ORDER BY

How can we sort employees by salary?

Beginnerโฑ 3 Minutesโญ 660 XP
๐Ÿค” THE QUESTION

How can we sort employees by salary?

๐Ÿ’ก WHAT IS IT?

ORDER BY sorts the returned query result set in ascending order by default.

๐ŸŽฏ WHAT IS IT USED FOR?

Alphabetical sorting, lowest-to-highest numerical sequencing, chronological timeline ordering.

๐Ÿ’ป EXAMPLE
SELECT name, salary
FROM employees
ORDER BY salary;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for ORDER BY.

  • โœ“ ORDER BY
  • โœ“ Ascending sort
  • โœ“ Numeric ordering
  • โœ“ Result formatting