SQL on LakeBench

Learn SQL from zero, and practice until it sticks

Start with what data and a table are, then work up through the first queries, filtering, grouping, joins and window functions. Every query runs in your browser against ready tables, so there is nothing to install.

  • 33

    lessons

  • 12

    free lessons

  • 50

    SQL sheet problems

What you will be able to do

After the sheet you can read a business question, pick the right clause, and write the query for the joins, ranking and running-total questions that fresher interviews ask.

Learn it in order

SQL from Zero to Advanced has 6 modules. 12 lessons are free.

  1. Module 1

    Understanding Data

    4 lessons

  2. Module 2

    Relational core

    6 lessons

  3. Module 3

    Windows, cleaning & ops

    5 lessons

  4. Module 4

    Advanced Querying

    6 lessons

  5. Module 5

    Warehouse & Dimensional Modeling

    6 lessons

  6. Module 6

    Performance & Production SQL

    6 lessons

See the full SQL from Zero to Advanced track

Practice by topic

SQL 50 lists 50 problems in a fixed order, 17 of them free. Work through one topic at a time.

  • Filter, sort and handle NULLs8
  • Count, sum and average by group9
  • Join tables6
  • Find rows with no match1
  • Compare rows in one table3
  • Deduplicate and keep the latest row4
  • Top N per group7
  • Running totals and moving averages4
  • Compare with the previous row4
  • Reshape rows and columns4

SQL topic guides

More for SQL

Questions

Do I need to know programming before learning SQL?
No. SQL reads close to everyday English, and the first lesson starts from what a table is. You only need to be able to type.
Is it free?
The first lessons, the beginner problems and the start of every sheet are free. A paid pass unlocks the rest, and nothing renews by itself.
Which SQL does the editor use?
A standard SQL engine that runs in your browser tab. Joins, CTEs and window functions work the way they do in Postgres, MySQL and the cloud warehouses, with small differences in date functions.