Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    A small course in 8 short lessons on the basics of SQL, the language for asking questions to a database. You practise on a small database of pets and owners that runs in your browser: you choose columns, filter rows, sort, count, group, add and change data and join two tables. You see the result of every query at once.

    Features

    • 8 short lessons, from SELECT to JOIN
    • A real SQLite database that runs in your browser
    • See the result table of every query
    • Check my answer, a hint and the full answer for every lesson

    How to use Learn SQL

    1. Read the lesson and the task.
    2. Write your query and press Run to see the result table.
    3. Press Check my answer. Use the hint or the answer if you are stuck.
    4. Go to the next lesson.

    Frequently asked questions

    Which kind of SQL is this?

    It is SQLite, a small database that runs inside your browser. The basics you learn here, such as SELECT, WHERE, GROUP BY and JOIN, work in almost every database. Some details differ, for example how dates and limits are written.

    Can I break the database?

    No. Every time you run a query the database is made again from scratch, so changes are not kept and nothing you do affects the next run. A few commands that could hang the page, such as recursive queries, are not allowed.

    How is my answer checked?

    The course runs your query and the model answer on the same data and compares the results. A different query that gives the same result is also accepted.

    Is my SQL saved?

    Only which lessons you finished is saved, in this browser. The queries you type are not stored or sent anywhere.

    Guides

    Related tools