SkyAICampus
HomePracticeLearnCode LabFocus
SkyAICampus
PrivacyTermssupport@skyaicampus.com© 2026 SkyAI Campus
Log inSign up

Learn

HomePracticeConcept cardsCode LabSky Tutor

Review

Revise todayMistake notebookProgress

Focus

Campus ForestFocus roomsSquads

Questions or feedback?
support@skyaicampus.com

  1. 1SELECT and WHERE
  2. 2Sorting and limits
  3. 3Aggregates and GROUP BY
  4. 4Joins
← SQL basics

Lesson 2 of 4

Sorting and limits

Watch, read the card, then practise. Sorting · Top results

Video coming soon

The video for this lesson is being recorded.

Meanwhile, the notes below and the 60-second cards cover the same ideas.

Practise this topic
  • Sorting

    ORDER BY sorts the result by one or more columns.

    Remember: If the order matters, always write ORDER BY.

  • Top results

    LIMIT keeps only the first few rows, often after sorting, to get the top results.

    Remember: Top N = ORDER BY ... DESC, then LIMIT N.

Try the example in Code Lab

SELECT name, marks FROM students ORDER BY marks DESC;
← SELECT and WHERENext: Aggregates and GROUP BY →

In this lesson

  • Sorting
  • Top results

Practise this topic

5 questions at your level. The best way to make it stick.

Practise 5 questions