A structured collection of SQL exercises, query examples, lecture slides, and reference documents for practicing relational databases.
Best for: Students and self-learners familiar with basic SQL syntax who want guided practice with queries, filtering, joins, aggregation, and subqueries.
Please note: The materials in this repository are primarily PDF, Word, and PowerPoint documents. It is a learning-resource collection—not a ready-to-run database, an application, or a repository of standalone .sql scripts.
Choose the subject you want to practice, open the corresponding file, and try the queries using a database environment of your choice.
| Topic | Recommended material | Format |
|---|---|---|
| Creating tables | Create Table | PowerPoint |
| Data manipulation | Data Manipulation Language | PowerPoint |
| Filtering and joins | WHERE and JOIN examples | |
| Grouping results | GROUP BY | PowerPoint |
| JOIN operations | Multiple-table JOIN types, JOINs — Part 1, Part 2 | PowerPoint |
| Subqueries | Subqueries, Nested-query examples | PowerPoint / PDF |
| Set operations | UNION, EXCEPT, INTERSECT and MINUS |
The names in the table follow the repository's existing files; no materials have been renamed.
If you prefer solving exercises over reading slides, explore these documents:
| Resource | File |
|---|---|
| Introductory exercise sets | Chapter 1 · Chapter 2 |
| General practice | General examples 1 · General examples 2 |
| Consolidated exercises | All chapters |
| Customer-related scenarios | Customer examples |
| Academic examples | Academic examples |
| Spotify-themed examples | Spotify examples |
1. Open the documents. GitHub may preview some PDFs, while PowerPoint or Word documents may need to be downloaded and opened using compatible software.
2. Select a topic. If you're learning SQL systematically, begin with table creation and data manipulation, then move to filtering, grouping, joins, and subqueries.
3. Practice in a database tool. Use an SQL environment you already have access to (such as PostgreSQL, MySQL, SQL Server, or SQLite). The repo does not provide a preconfigured database server or a unified sample dataset.
4. Adapt the examples. SQL syntax differs between database systems. You may need to create sample tables and adapt vendor-specific features before running queries.
5. Experiment. Change predicates, JOIN conditions, and aggregation rules to understand how the results change.
- Database basics: Tables, columns, data types, and primary keys.
- Query fundamentals:
SELECT,WHERE, sorting, and filtering. - Data operations:
INSERT,UPDATE, andDELETE. - Aggregation:
GROUP BYand aggregate functions. - Relationships:
INNER JOIN,LEFT JOIN, and multi-table queries. - Advanced queries: Subqueries, nested queries, and set operations.
This is a suggested path through the materials, not a formal course syllabus or a guarantee that every concept is covered in every file.
- File names and document formats have been preserved so existing references keep working.
- Some documents may use SQL dialects that differ from your preferred database.
- Review the examples and any external data before executing write operations against a database; practice with a disposable test database.
- This repository is provided as a study resource, rather than a packaged software project.
Goal: Help learners strengthen SQL problem-solving skills through topic-based exercises and study material.