This repository contains a structured collection of SQL assignments and solutions covering beginner to intermediate SQL concepts. Each folder represents one day of learning, with exercises focused on a specific set of topics. This was created as part of a structured learning program to build real-world SQL query-writing skills.
Each folder includes:
- Assignment questions (
.txt) - Solutions (
.sql)
| Folder | Topics Covered |
|---|---|
| Day1 - SQL basics | SQL basics, SELECT, WHERE, ORDER BY |
| Day2 - Filtering, operators | Basic filtering, comparison operators, logical conditions |
| Day3 - Aggregation Functions, GroupBy, Having, Joins | Aggregate functions, GROUP BY, HAVING, and basic joins |
| Day4 - Joins, Built-In Functions | Inner/outer joins, built-in functions (string, date, numeric) |
| Day5 - Subqueries, CTEs, Temporary Tables | Subqueries, WITH clauses (CTEs), temp tables |
| Day6 - Window Analytical Functions and Recursive CTEs | Ranking, partitioning, lead/lag, recursive CTEs |
| Day7 - Advanced Aggregation, Stored Procedures and Functions | Advanced grouping, procedures, custom functions |
| Day8 - Database Indexes, Advanced Updates and Merge | Index strategies, complex UPDATE, MERGE |
| Day9 - Project 1 | Applied mini project β real-world SQL scenario |
| Day10 - Project 2 | Applied mini project β more advanced use case |
- Clone or download the repository.
- Browse to any folder (e.g.,
Day6-Window Analytical Functions and Recursive CTEs). - Open the assignment file to read the questions.
- Open the corresponding solution file to review the answers.
- Optional: Run the SQL queries using a SQL environment (e.g., PostgreSQL, MySQL, SQL Server, or SQLite).
- Data filtering and aggregation
- Joins (inner, outer, self joins)
- Subqueries & CTEs (including recursion)
- Window functions (e.g.,
ROW_NUMBER(),RANK(),LAG()) - Stored procedures & functions
- Database performance tuning basics
- Real-world problem-solving through projects
This project is shared for learning and portfolio purposes. Feel free to reference or adapt it for your own practice. Please do not redistribute without permission.