SQL LEARNING PLATFORM
Controlling the sequence of your results.
Learning Blocks
Interactive Queries
Concepts you'll master
Ascending (ASC) and descending (DESC) sort
Sorting by multiple columns — primary and secondary sort
Sorting by expressions and aliases
SELECT name, salary FROM employees ORDER BY salary ASC;
SELECT name, department, salary FROM employees ORDER BY department ASC, salary DESC;
🌟 Note: SQL reads ORDER BY columns left to right: first sort by department (A→Z), then within each department sort by salary (high→low).
Practice your SQL skills