SQL HOME
SQL Tutorial
SQL (Structured Query Language) is the standard language used to work with relational databases. With SQL you can read data, filter it, sort it, calculate summaries, and modify records safely and efficiently.
What You Will Learn
This tutorial focuses on practical SQL you can use in real projects. You will learn how to write queries that answer questions, how to change data correctly, and how to structure queries so they stay readable as they grow.
Who This Tutorial Is For
If you are a beginner, you will start with the basics and build up step by step. If you already know some SQL, you can use this as a clean reference and fill in gaps like joins, grouping, and subqueries.
How This Tutorial Is Organized
We start with the essential building blocks (SELECT, WHERE, ORDER BY) and then move into combining tables with JOINs, summarizing data with GROUP BY, and using subqueries for more advanced filtering.
SQL Basic Roadmap
- Read data: SELECT, DISTINCT, WHERE, ORDER BY
- Combine conditions: AND, OR, NOT
- Modify data: INSERT, UPDATE, DELETE
- Work with NULL: NULL checks and safe comparisons
- Summaries: COUNT, SUM, AVG, MIN, MAX
- Search patterns: LIKE and wildcards
- Ranges and lists: BETWEEN, IN
- Join tables: INNER JOIN and LEFT JOIN
SQL Advanced Roadmap
- More joins: RIGHT JOIN, FULL JOIN, SELF JOIN
- Combine results: UNION, UNION ALL
- Grouping filters: HAVING
- Subqueries: EXISTS, ANY, ALL
- Conditional logic: CASE
- Copy data: SELECT INTO, INSERT INTO SELECT
- Reusable logic: stored procedures (where supported)
- Operators: comparison, logical, and arithmetic operators
Database Topics You May Need
After the tutorial, we cover database-focused topics like creating databases and tables, constraints (primary key, foreign key), indexes, views, and data types. These are important for building correct schemas and keeping queries fast.
SQL Notes About Different Database Systems
SQL is a standard, but some features differ between MySQL/MariaDB, SQL Server, PostgreSQL, and others. In this tutorial, we focus on the common core and clearly mention differences when they matter (for example, LIMIT vs TOP).
Example
This is a small preview of how SQL queries look. You will learn every part step by step in the next lessons.
SELECT name, price FROM products WHERE price > 100 ORDER BY price DESC;
Next Steps
Continue with SQL Intro to understand the basic concepts and how tables, rows, and columns relate to queries.