Stop writing SELECT *

A SQL course for people who want analyst work is being recorded. Until it opens, practise on the table below: it runs in your browser, no install and no sign-up.

Not on sale yet. Waitlist members hear first, by email.

Which city brings in the most money?

Scroll, and one query grows from a lazy first look into the answer.

Sample data, 12 made-up orders

  1. Everyone starts here.

    SELECT * hands you every column of every row. Fine for a first look, useless as an answer. Nobody asked for all of it.

  2. Ask for the columns you need.

    The question is about cities and money, so that is all we keep. Less on screen, less to get wrong.

  3. Filter the rows.

    WHERE drops the orders that were cancelled. They are crossed out here so you can see what the filter removed.

  4. Group, then count.

    GROUP BY folds the rows into one line per city. COUNT and SUM tell you how many orders each city placed and what they were worth.

  5. Put the answer on top.

    ORDER BY sorts by revenue, biggest first. Five lines of SQL, and the table now answers a question a manager would ask.

Your turn. Change the query.

Pick a question, or set each clause yourself. The result updates as you go.

Sample data, 12 made-up orders

This bench covers a handful of clauses on one table. The course goes on to joins across several tables, which a toy like this cannot show well.

What the course is planned to cover

Planned topics. The final syllabus, lesson count and price are shared with the waitlist at launch.

  1. Write real queriesSelect, filter, sort and group from the first lesson.
  2. Join tablesCombine data from several tables without losing track of the rows.
  3. Answer business questionsTurn raw rows into a number a team can act on.
  4. Practise interview questionsThe kind of SQL problems analyst interviews set.

Hear the day it opens.

One email when the SQL course goes on sale. Add your WhatsApp number if you would like the message there too.

No spam. Unsubscribe any time.

SQL gets you the data. Statistics tells you what it means.

The statistics course is open now: 35 lessons, ₹299.

See the statistics course