Skip to main content
SQL • LESSON 54

ORDER BY DESC

How can we show the highest salaries first?

Beginner3 Minutes670 XP
🤔 THE QUESTION

How can we show the highest salaries first?

💡 WHAT IS IT?

The DESC keyword reverses sorting order from highest to lowest or Z to A.

🎯 WHAT IS IT USED FOR?

Leaderboards, finding recent timestamps, top compensation analysis.

💻 EXAMPLE
SELECT name, salary
FROM employees
ORDER BY salary DESC;

🎯 Mission Objectives

Practice typing production-grade SQL code for ORDER BY DESC.

  • DESC keyword
  • Descending order
  • Top-value ranking
  • Sorting syntax