Home › Learn by Playing › Skills › SQL

Learn SQL free, step by step

Ask questions of data: filter, sort, join and summarise.

12 units · 104 cards · Basic → Intermediate → Advanced · free, no login

Start learning SQL ▶

How it works

Try a few cards

💡 Learn

SELECT and FROM

SELECT says which columns you want. FROM says which table to read. Use SELECT * to get all columns. DISTINCT removes repeated rows, and AS gives a column a new name in the result.

Try it

What does SELECT * mean?

  • Count all the rows
  • Show all columns of the table
  • Show only the first column
  • Show only the first row
Show the answer

✓ Show all columns of the table. The star * means every column. It does not limit the rows.

Try it

What does AS do in SELECT amount AS price FROM orders?

  • Adds a new column called AS
  • Changes the column name inside the table forever
  • Gives the amount column a new name, price, in the result
  • Keeps only rows where amount is a price
Show the answer

✓ Gives the amount column a new name, price, in the result. AS makes an alias. It changes the name only in the result, not in the table.

Full syllabus

Basic · 4 units

  1. SELECT and FROM
  2. WHERE
  3. ORDER BY
  4. COUNT, SUM, AVG

Intermediate · 4 units

  1. GROUP BY and HAVING
  2. JOINs
  3. Subqueries
  4. INSERT, UPDATE, DELETE

Advanced · 4 units

  1. Window functions
  2. CTEs
  3. Indexes and performance
  4. Star schema modelling

Start learning SQL ▶

Kramavriddhi Learn is free and independent. Facts are checked against the official documentation. Badges are self-checks, not official certificates. Found a mistake or have an idea? Tell us.