About the Course

Basic SQL
≈ 3 min read

What we study in the course

SQL is the main language for interacting with relational databases. It is used for much more than retrieving rows from a table: you can define data structures, modify records, join tables, calculate aggregates, manage transactions, and analyze query performance.

The course moves from basic operations toward topics that become especially important in real applications: joins, subqueries, indexes, transactions, isolation levels, locks, normalization, and optimization.

To reinforce practical skills, the course uses different types of exercises:

  • Multiple-choice test;
  • Complete a query fragment;
  • Put query parts in the correct order;
  • Match terms with definitions;
  • Enter an exact answer;
  • Select the incorrect line;
  • Write an SQL query yourself.

Different practice formats help you remember not only the syntax, but also understand the result of a query: which rows remain after filtering, how the data set changes after a JOIN, and why an aggregate returns a particular value.

Course roadmap

The topics are ordered so that new constructions build on what you already know:

  • SQL foundation. Syntax, data types, creating and changing data, constraints, keys, and basic queries.
  • Retrieving and combining data. Filtering, sorting, aggregate functions, grouping, JOINs, and subqueries.
  • How the database behaves under load. Indexes, transactions, ACID, isolation levels, locks, normalization, and query optimization.

If a complex query stops being clear, it helps to mentally break it into steps: where the data comes from, which rows are filtered out, how tables are joined, and what is calculated in the final result set.

How we explain queries

Examples stay small: one query — one main idea. That makes it easier to see SQL behavior without being distracted by dozens of tables and large amounts of data.

SELECT name, price
FROM products
WHERE price > 1000
ORDER BY price DESC;

The important thing here is not simply to memorize the order of the keywords. You should see the meaning of the query: take data from the products table, keep products that cost more than 1000, and sort the result by price from highest to lowest. The same approach will later be used with more complex queries.

The main goal is to understand the result before running the query. If you can look at SQL and roughly picture which rows and columns will be returned, you have truly understood the topic.