BEGINNER English Free

SQL Foundations: Your First Queries, Explained Properly

4 students 54 lessons

About this course

A complete, patient introduction to SQL for people who have never written a query. You will install PostgreSQL, load a small bookshop database you can read end to end, and build up from SELECT to joins, aggregation, and creating your own tables — with the reasoning behind every clause, not just the syntax. Each idea starts with the problem it solves and how the database actually answers it, so the rules stick instead of blurring together. By the end you can answer real questions about real data, and you are ready for SQL & Database Design: Beyond the Basics.

What you'll learn

  • Read and write SELECT queries with confidence, including filtering, sorting and limiting
  • Explain what NULL means and avoid the mistakes it causes in comparisons and counts
  • Summarise data with COUNT, SUM, AVG, GROUP BY and HAVING, and know why WHERE and HAVING differ
  • Combine tables with INNER and LEFT JOIN, and reason about which rows survive a join
  • Insert, update and delete data safely, and undo a mistake with a transaction
  • Create your own tables with sensible types and constraints that keep bad data out
  • Break a hard question into steps with subqueries and CTEs
  • Debug a query that returns nothing, too much, or the wrong number

Stuck on something? Ask

Every lesson has an assistant that can see the lesson you are reading. Ask in your own words and it answers using the same examples and table names in front of you — no switching to a search engine and losing your place.

Ask about this lesson

Why does WHERE come after FROM?

Because the database reads the rows first, then decides which to keep. That order is also why WHERE cannot see a SELECT alias.

It will not give you assessment answers — it explains the idea they test, so the certificate still means something.

Not ready yet?

One email when something new is published. Nothing else.

We confirm the address first, and every email has a one-click unsubscribe.

Course content

What a Database Is, and Your First Query 7 lessons
SELECT: Choosing, Naming, Sorting and Limiting 6 lessons
  • Calculations and aliases
  • DISTINCT: each value once
  • ORDER BY: putting rows in an order you chose
  • LIMIT: asking for only the first few
  • Knowledge check: shaping what comes back
  • Section 2 handout (PDF)
WHERE: Keeping Only the Rows You Want 5 lessons
  • The WHERE clause, and how the database reads it
  • Combining conditions with AND, OR and NOT
  • Pattern matching with LIKE
  • Knowledge check: filtering rows
  • Section 3 handout (PDF)
NULL: The Value That Means "We Do Not Know" 5 lessons
  • What NULL means, and what it does not
  • Testing for NULL, and the rows that quietly vanish
  • Working with NULL: COALESCE and counting
  • Knowledge check: NULL and three-valued logic
  • Section 4 handout (PDF)
Types, and the Functions That Go With Them 5 lessons
  • The types you will actually meet
  • Converting between types
  • Functions worth knowing on day one
  • Knowledge check: data types and functions
  • Section 5 handout (PDF)
Aggregation: Answering Questions About Groups 5 lessons
  • From rows to summaries
  • GROUP BY: many answers at once
  • HAVING: filtering the groups themselves
  • Knowledge check: GROUP BY and aggregates
  • Section 6 handout (PDF)
Joins: Working With More Than One Table 5 lessons
  • Why the data is split up in the first place
  • INNER JOIN: matching rows from both tables
  • LEFT JOIN: keeping rows that have no match
  • Knowledge check: joining tables
  • Section 7 handout (PDF)
Changing Data Safely: INSERT, UPDATE, DELETE 5 lessons
  • INSERT: adding rows
  • UPDATE and DELETE, and the WHERE you must not forget
  • Transactions: making mistakes undoable
  • Knowledge check: modifying data
  • Section 8 handout (PDF)
Creating Your Own Tables 4 lessons
  • CREATE TABLE, and choosing types deliberately
  • Constraints: making bad data impossible
  • Knowledge check: tables, keys and constraints
  • Section 9 handout (PDF)
Putting It Together, and Where to Go Next 7 lessons
  • Subqueries: a query inside a query
  • CTEs: naming the steps
  • Debugging a query that is wrong
  • What you know now, and what comes next
  • Knowledge check: subqueries and CTEs
  • Final exam: SQL Foundations
  • Section 10 handout (PDF)

Frequently asked questions

Do I need any programming experience?

No. SQL is not a programming language in the usual sense — you describe the result you want and the database works out how to get it. If you can read a spreadsheet, you can start this course.

Which database do I need to install?

PostgreSQL 14 or later, which is free on every operating system. Section 1 walks through installing it and loading the practice database. Almost everything you learn applies equally to MySQL, SQL Server and SQLite; the few places they differ are called out as you meet them.

How is this different from SQL & Database Design: Beyond the Basics?

This course assumes nothing and ends where that one begins. It takes you from "what is a table" to joins, grouping and creating your own tables. The other course starts from the assumption that you already write joins and GROUP BY daily, and goes into window functions, query plans and isolation levels. Take this one first.

Is this a video course?

No. Every lesson is written out in full, so you can read at your own pace, search it later, and keep it open beside your terminal. Each section also ships as a printable PDF handout.

Will I be able to use this at work?

Yes — reading and writing everyday queries against a real database is exactly what this covers. What it does not cover is performance tuning and schema design at scale, which is the follow-on course.

Do I need to memorise the syntax?

No, and you should not try. The course teaches the mental model behind each clause and expects you to look up exact spellings forever, like every working developer does.

Instructor

Fepiq Courses

Practical engineering courses written for people who prefer reading to watching.

Free

We'll send your receipt and a sign-in code here. No password needed.

Full lifetime access · Certificate on completion · AI tutor in every lesson

Save ₹0

The SQL Track: Foundations to Database Design

  • SQL Foundations: Your First Queries, Explained Properly (this course)
  • SQL & Database Design: Beyond the Basics
₹2,299 ₹1,799 separately