Find a course
Age level: Adults & professionals (18+)BeginnerData & AI

SQL for Beginners

Query, filter, summarize and join data with confidence

⏱ 2 h 10 min5 modules · 11 lessons87 practice questionsFinal exam: 20 questions
Included with this course

Your certificate for this course

Finish the 11 lessons (about 2 h 10 min) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.

  • Your name and this course titlePrinted in classic diploma typography
  • Grade: Pass, Merit or DistinctionOn the gold seal, with your final score
  • Unique ID and QR codeAnyone can verify it in seconds
  • Score report PDFModule-by-module results and exam score
  1. Lessons11 lessons
  2. Final exam20 questions · 70% to pass
  3. CertificatePDF + score report

What you will learn

  • Explain how relational databases organize data into tables, rows, columns and keys
  • Write SELECT queries that choose columns, rename them, remove duplicates, sort results and limit rows
  • Filter rows with WHERE using comparison operators, AND, OR, IN, BETWEEN and LIKE, with correct precedence
  • Handle NULL values correctly with IS NULL and COALESCE, and build computed columns with CASE
  • Summarize data with COUNT, SUM, AVG, MIN and MAX, and group results with GROUP BY and HAVING
  • Combine tables with INNER JOIN and LEFT JOIN using primary and foreign keys, and find unmatched rows
  • Use subqueries and common table expressions to break complex questions into steps
  • Create tables with constraints and safely insert, update and delete data using transactions

About this course

Almost every app, website and business runs on a database, and SQL is the language used to ask those databases questions. Analysts use it to answer "how many customers ordered last month?", developers use it to power apps, and marketers, product managers and researchers use it to get their own answers instead of waiting for someone else's report. SQL has been around for about half a century and is still one of the most requested skills in data job listings.

This free course teaches SQL from zero in one sitting. You'll work with one small, realistic bookstore database throughout: a table of books, a table of customers and a table of orders. Because the data is small enough to see in full, you can check every query result with your own eyes and really understand what each clause does.

You'll start with what a relational database is and write your first SELECT query. Then you'll filter rows with WHERE, combine conditions, match patterns with LIKE and handle the tricky NULL value correctly. Next you'll summarize data with COUNT, SUM and AVG, group results with GROUP BY and filter groups with HAVING. The joins module explains primary and foreign keys and shows exactly how INNER JOIN and LEFT JOIN combine tables, plus subqueries and common table expressions. Finally, you'll create tables and insert, update and delete rows safely using constraints and transactions.

The course is for complete beginners: career changers, students, analysts who live in spreadsheets, and anyone curious about data. No installation is needed. Every lesson mixes short explanations with spot-the-bug challenges, result predictions and quick checks, and you can earn a free certificate of completion by passing the final exam.

Syllabus

  1. Databases and Your First Queries

    Understand how relational databases store data, then write SELECT queries that pick columns, sort results and limit rows.

    1. What Is a Database and Where Does SQL Fit?11 min
    2. Your First SELECT: Columns, Sorting and Limits13 min
  2. Filtering Rows

    Choose exactly the rows you need with WHERE, combine conditions correctly, match patterns, and handle missing values without surprises.

    1. Filtering with WHERE: Comparisons, AND, OR, IN, BETWEEN and LIKE14 min
    2. NULL Values, CASE and Calculated Columns13 min
  3. Summarizing Data

    Turn many rows into answers with aggregate functions, then group and filter summaries with GROUP BY and HAVING.

    1. Aggregate Functions: COUNT, SUM, AVG, MIN and MAX12 min
    2. GROUP BY and HAVING: Summaries per Group14 min
  4. Joining Tables

    Design related tables with keys, combine them with INNER and LEFT joins, and break complex questions down with subqueries and CTEs.

    1. Keys, Relationships and Why Data Is Split Into Tables12 min
    2. INNER JOIN and LEFT JOIN15 min
    3. Subqueries and Common Table Expressions13 min
  5. Creating and Changing Data

    Create tables with the right data types and constraints, then insert, update and delete rows safely using transactions.

    1. Creating Tables: Data Types and Constraints12 min
    2. INSERT, UPDATE, DELETE and Transactions14 min
  6. Final exam and certificate

    20 questions drawn from a pool of 34. Score 70% or more to pass; retakes get a fresh set of questions.

Try a sample question

In SQL, the keywords SELECT and select mean the same thing.

True or false?

Show the answer

Answer: True

SQL keywords are case-insensitive. Capitalizing them is a readability convention, not a requirement. Be careful, though: text values in quotes, such as 'Austin' versus 'austin', may be compared case-sensitively depending on the database and its settings.

Database
An organized collection of data stored so it can be easily searched and updated.
Relational database
A database that stores data in tables that can be linked to each other through key columns.
DBMS
Database management system: the software, such as PostgreSQL or MySQL, that stores data and runs queries.
SQL
Structured Query Language, the standard language for querying and changing relational databases.
Table
A set of rows that share the same columns, each table usually describing one kind of thing.
Row
One record in a table, such as one customer or one order.

Frequently asked questions

How long does it take to learn SQL?

The core of SQL used in everyday analysis, namely SELECT, WHERE, GROUP BY and JOIN, can be learned in a few focused hours, which is what this course covers. Becoming fluent takes a few weeks of regular practice on real data, and advanced topics such as window functions and query tuning take longer.

Which SQL dialect should I learn first?

Start with standard SQL as taught here; it works almost identically in PostgreSQL, MySQL, SQLite, SQL Server and Oracle. Dialects differ in details such as how to limit rows, date functions and string concatenation. PostgreSQL and SQLite are free and popular choices for practice.

Is SQL a programming language?

SQL is a declarative query language: you describe the result you want, and the database figures out how to get it. It is not a general-purpose language like Python or JavaScript, but modern SQL is powerful enough to express complex logic, and it is used alongside general-purpose languages in most software.

What is the difference between WHERE and HAVING?

WHERE filters individual rows before they are grouped, while HAVING filters groups after aggregation. Use WHERE for conditions on raw columns, such as price above 20, and HAVING for conditions on aggregates, such as groups with more than five orders.

Do I need to install anything to practice SQL?

Not for this course. Afterward, you can practice with SQLite, which is a single small file, with a free PostgreSQL or MySQL installation, or with online SQL playgrounds that run in the browser.

What is the difference between SQL and NoSQL?

SQL databases store data in tables with defined columns and relationships and are queried with SQL. NoSQL databases use other models, such as documents, key-value pairs or graphs, which can suit flexible or massive-scale data. Many organizations use both, and relational databases remain the most common choice for business data.

Is the certificate an accredited qualification?

No. It is a certificate of completion showing you finished the lessons and passed the exam. It demonstrates initiative and core SQL knowledge, but it is not an academic or vendor certification.

Sources and further reading

Related courses

University studentsIntermediate

Database Design Basics

ER diagrams, keys, normalization and SQL schemas that stay correct

Data & AI
2 h 45 min12 lessonsCertificate
Adults & professionalsBeginner

Data Analysis Fundamentals

Ask good questions, clean data, summarize it honestly and turn numbers into decisions

Data & AI
2 h 20 min12 lessonsCertificate
University studentsIntermediate

Python for Data Science

NumPy, pandas, data cleaning, charts and a first model with scikit-learn

Data & AI
2 h 50 min12 lessonsCertificate
Adults & professionalsIntermediate

Statistics for Data Analysis

The statistics analysts use every day, from skewed averages to A/B tests

Data & AI
2 h 20 min11 lessonsCertificate
University studentsIntermediate

Data Cleaning Essentials

Fix missing values, messy text, bad dates, duplicates and outliers with a repeatable process

Data & AI
2 h 40 min12 lessonsCertificate