SQL is the language used to ask questions of data stored in databases. It looks intimidating at first, but most everyday queries are built from just five clauses. Learn those and you can already answer a surprising number of business questions.
One clause, one job
A query reads almost like an English sentence. Each clause has a single, clear purpose, and you can read them top to bottom.
The clauses at a glance
| Clause | Question it answers | Example |
|---|---|---|
| SELECT | Which columns do I want? | customer, amount |
| FROM | Which table holds the data? | orders |
| WHERE | Which rows should be included? | status = ‘Paid’ |
| GROUP BY | How should rows be combined? | one row per customer |
| ORDER BY | In what order should results appear? | largest total first |
The next step: joins
Real data is usually spread across several tables, for example customers in one and orders in another. A join combines them using a shared column such as a customer ID. The three joins below cover most situations you will meet.
How to practise
Pick a small dataset you understand, such as a sales or attendance sheet, load it into a practice database and write five questions you would like answered. Turn each into a query. Checking your result against what you expected is the quickest way to learn.
Key takeaways
- Most queries are built from SELECT, FROM, WHERE, GROUP BY and ORDER BY.
- Read and write them in the order you would explain the question.
- Joins combine tables through a shared column.
- Practise with questions you already know the answers to.
Want to learn SQL properly?
Our SQL for Data Professionals course takes you from first query to joins and analysis with trainer feedback.
Enquire about SQL training


