Ask a database questions and change its data, from your very first query to tables of your own.
- 28 lessons
- 7 units
- 3 h 24 m in all
- £0, for good
what’s inside.
For people who have never written a line of code. Nothing is assumed: every new word is explained the moment it appears.
SQL Level 1 assumes nothing. In 28 short lessons you go from what a database is to building, filling and questioning your own tables, with a guess, a hands-on task and a fix-the-query challenge in every lesson. It ends with a level check: answering a shop owner's questions with queries that work for any shop.
every lesson goes the same way.
- meet it
- guess first
- your turn
- fix it
- nailed it
unit 1
Meet your data
Ask a database to show you what it holds.
- What a database is5 minFind out what a database is and ask it your very first question.
- Your first query6 minRead and write a question that shows a whole table.
- Choosing columns7 minAsk for only the columns you need, in the order you like.
- When it goes wrong8 minRead error messages and fix the three you will meet most.
unit 2
Pick your rows
Ask for only the rows you need.
- WHERE picks the rows7 minKeep only the rows that match what you are looking for.
- Text goes in quotes8 minSearch for words as well as numbers, without confusing the database.
- Bigger, smaller, different8 minFind rows above, below or not equal to a value.
- And, or, not8 minLink conditions together to ask sharper questions.
unit 3
Sort and trim
Put results in order and keep only the bits you want.
- Putting rows in order7 minSort your results from smallest to biggest, or the other way round.
- Only the top few6 minShow the best three, the cheapest one, or any number you like.
- No repeats6 minList each value once, however many times it appears.
- Searching with patterns8 minFind text that starts with, ends with or contains some letters.
unit 4
Blanks, maths and text
Handle missing values and work out new ones.
unit 5
Sum it up
Turn a whole table into one answer.
unit 6
Change the data
Add, change and remove rows.
unit 7
Build your own tables
Make your own tables, then put everything together.
- Making a table8 minBuild a brand new table and decide what goes in it.
- Rules for columns8 minStore decimals, and stop important boxes being left empty.
- Every row gets an id8 minGive each row its own number so you can always find it.
- Putting it all together9 minBuild a table, fill it, change it and ask it questions.