SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog

© 2026 SQL Playground. Built for developers.

PrivacyTermsAboutRSS Feed
SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog
Initializing...
Chapter 2: Filtering & Sorting
2-2
Your Progress

Sorting Results

Use ORDER BY to sort your results. By default, it sorts in ascending order (ASC). Use DESC for descending.

SELECT * FROM users ORDER BY name ASC;

Task: Select all users and sort them by their name in descending order.

Loading...
Run a query to see results