Skip to content
CodeItRaw
Path

Pulling the rows and columns you want from a database: SELECT, WHERE, ORDER BY, LIMIT and NULL.

Key ideas

  • SELECT says which columns, FROM which table and WHERE which rows you want.
  • Order is only guaranteed by ORDER BY; LIMIT cuts after sorting.
  • NULL means "unknown": = NULL finds nothing, IS NULL does.

Pattern

SELECT name, salary
FROM employees
WHERE salary > 40000
ORDER BY salary DESC
LIMIT 5;

Lessons

Each lesson explains one idea from zero and ends with a few tasks. Lessons open in order; the explanation can be read at any time.

  1. 01

    Choosing columns from a table, and ordering

    0/2 tasks

  2. 02

    Filtering with WHERE

    0/2 tasks

  3. 03

    Text patterns and missing values

    0/2 tasks

Boss

  • 04

    Team leads

    SQL query

  • The boss opens when every lesson of the topic is finished. Solve it too and the topic is complete, and the topics after it open.