A complete MySQL study kit — whether you're learning SQL from scratch, cracking data analyst interviews, or practicing complex queries, everything is organized and ready to use.
| Folder | Contents | Best For |
|---|---|---|
📝 notes/ |
Clean, structured MySQL theory notes | Beginners & revision |
❓ interview-questions/ |
Top SQL/MySQL interview Q&A | Job & placement prep |
💻 coding-questions/ |
SQL query problems with solutions & explanations | Query practice |
✍️ handwritten-notes/ |
Scanned handwritten notes for quick revision | Visual learners |
📋 practice-sheets/ |
Topic-wise query practice sheets | Daily practice |
📄 cheatsheets/ |
Quick reference for SQL syntax & functions | Fast revision |
🔰 SQL & MySQL Basics
- What is a Database? RDBMS concepts
- MySQL installation & setup
- Creating & managing Databases and Tables
- Data Types in MySQL (INT, VARCHAR, DATE, FLOAT, etc.)
- INSERT, SELECT, UPDATE, DELETE (CRUD operations)
- WHERE clause & filtering data
🧱 Intermediate SQL
- JOINs: INNER, LEFT, RIGHT, FULL OUTER, CROSS, SELF
- GROUP BY, HAVING, ORDER BY
- Aggregate Functions: COUNT, SUM, AVG, MIN, MAX
- Subqueries & Nested Queries
- DISTINCT, LIMIT, OFFSET
- NULL handling: IS NULL, COALESCE, IFNULL
⚙️ Advanced MySQL
- Stored Procedures & Functions
- Triggers & Events
- Views & Materialized Views
- Indexes & Query Optimization
- Transactions: COMMIT, ROLLBACK, SAVEPOINT
- ACID Properties
- Window Functions: ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG
🗂️ Database Design
- Entity-Relationship (ER) Diagrams
- Normalization: 1NF, 2NF, 3NF, BCNF
- Primary Key, Foreign Key, Constraints
- One-to-One, One-to-Many, Many-to-Many relationships
- Schema Design best practices
🎯 Interview Preparation
- Top 100 SQL interview questions with answers
- Difference-based questions (DELETE vs TRUNCATE vs DROP, etc.)
- JOIN-based tricky queries
- Window function interview Qs
- Normalization scenario questions
- Real-world query problems asked at MNCs
# Clone the repo
git clone https://github.com/AdityaChouhan01/mysql-complete-guide.git
# Go inside
cd mysql-complete-guide
# Open in VS Code
code .Or just browse folders directly on GitHub — no setup needed!
-- Find the second highest salary
SELECT MAX(salary) AS second_highest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
-- Count employees per department
SELECT department, COUNT(*) AS total
FROM employees
GROUP BY department
ORDER BY total DESC;
-- Find duplicate emails
SELECT email, COUNT(*) as count
FROM users
GROUP BY email
HAVING count > 1;More solved problems inside the
coding-questions/folder!
- 🎓 Students learning SQL/databases for the first time
- 💼 Job seekers preparing for data analyst / backend / full-stack interviews
- 🧑💻 Developers who need a quick SQL reference
- 📊 Aspiring data analysts building their SQL skills
- 📚 Self-learners who want structured notes alongside online courses
- ✅ Handwritten + typed notes — best of both worlds
- ✅ Topic-wise organized — no hunting around
- ✅ Real interview Q&A — questions asked at top product companies
- ✅ Query problems with solutions — learn by doing
- ✅ Covers DB design — normalization, ER diagrams, keys
- ✅ Free forever — open-source, no paywalls
mysql-complete-guide/
│
├── 📝 notes/
│ ├── 01-sql-basics.md
│ ├── 02-joins.md
│ ├── 03-aggregate-functions.md
│ ├── 04-subqueries.md
│ └── 05-advanced-mysql.md
│
├── ❓ interview-questions/
│ ├── basic-sql-interview-qs.md
│ ├── joins-interview-qs.md
│ ├── advanced-sql-interview-qs.md
│ └── difference-based-qs.md
│
├── 💻 coding-questions/
│ ├── basic-queries/
│ ├── joins-problems/
│ ├── aggregation-problems/
│ └── window-functions/
│
├── ✍️ handwritten-notes/
│ ├── joins-diagram.pdf
│ └── normalization-notes.pdf
│
├── 📋 practice-sheets/
│ ├── week-01-basics.md
│ ├── week-02-joins.md
│ └── week-03-advanced.md
│
└── 📄 cheatsheets/
├── sql-syntax-cheatsheet.md
├── joins-cheatsheet.md
└── mysql-functions-cheatsheet.md
⚠️ Update the folder structure above to match your actual files before pushing!
Found an error? Want to add more query problems or notes? Contributions are welcome!
- Fork this repo
- Create a branch:
git checkout -b add-sql-notes - Commit:
git commit -m "Add: window functions notes" - Push:
git push origin add-sql-notes - Open a Pull Request
Licensed under the MIT License — free to use, share & modify with credit.
If this saved your time, drop a ⭐ — it means a lot and helps others find this repo!
Made with 🗄️ and late nights by Aditya Chouhan