Skip to content

Latest commit

Β 

History

History
153 lines (111 loc) Β· 3.69 KB

README.md

File metadata and controls

153 lines (111 loc) Β· 3.69 KB

πŸš€ LeetCode SQL 50 Study Plan

A structured repository documenting my journey through the LeetCode SQL 50 Study Plan to strengthen SQL fundamentals, analytical thinking, and problem-solving skills for Data Engineering interviews.


πŸ“Œ About This Repository

This repository contains my solutions to the LeetCode SQL 50 study plan. Rather than simply solving problems, I focus on:

  • Understanding the business problem
  • Writing clean and readable SQL
  • Exploring multiple approaches whenever possible
  • Learning SQL concepts used in real-world data engineering
  • Documenting mistakes and lessons learned

This repository serves as both my interview preparation notebook and a reference for future SQL projects.


🎯 Goals

  • βœ… Master SQL fundamentals
  • βœ… Improve analytical problem-solving
  • βœ… Prepare for Data Engineering interviews
  • βœ… Learn efficient query writing
  • βœ… Build confidence with joins, aggregations, CTEs, and window functions

πŸ›  Skills Practiced

  • SELECT Statements
  • Filtering & Sorting
  • Aggregate Functions
  • GROUP BY & HAVING
  • CASE Expressions
  • INNER / LEFT / RIGHT / CROSS JOIN
  • Subqueries
  • Common Table Expressions (CTEs)
  • Window Functions
  • Date & Time Functions
  • String Functions
  • Mathematical Functions
  • Conditional Aggregation
  • Ranking Functions
  • Set Operations
  • Data Analysis Techniques

πŸ“‚ Repository Structure

LeetCode-SQL-50/
β”‚
β”œβ”€β”€ Easy/
β”‚   β”œβ”€β”€ 0175_Combine_Two_Tables.sql
β”‚   β”œβ”€β”€ 0181_Employees_Earning_More_Than_Their_Managers.sql
β”‚   └── ...
β”‚
β”œβ”€β”€ Medium/
β”‚   β”œβ”€β”€ 0550_Game_Play_Analysis_IV.sql
β”‚   β”œβ”€β”€ 1251_Average_Selling_Price.sql
β”‚   └── ...
β”‚
β”œβ”€β”€ Hard/
β”‚   └── ...
β”‚
└── You are here

πŸ“ˆ Learning Approach

For every problem, I try to understand:

  1. What is the business requirement?
  2. Which SQL concepts solve the problem?
  3. Can the query be written in a simpler or more efficient way?
  4. What edge cases should be considered?
  5. What did I learn from the solution?

This approach helps me move beyond memorizing queries and build practical SQL skills.


πŸ“š Concepts Covered

Category Topics
Basic SQL SELECT, WHERE, ORDER BY
Aggregation COUNT, SUM, AVG, MIN, MAX
Grouping GROUP BY, HAVING
Joins INNER, LEFT, RIGHT, SELF JOIN
Subqueries Scalar, Correlated
CTEs Recursive & Non-Recursive
Window Functions ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG, FIRST_VALUE
Conditional Logic CASE WHEN
Date Functions DATE_TRUNC, EXTRACT, TO_CHAR
Advanced SQL Analytical Queries, Ranking, Conditional Aggregation

πŸ’» Environment

  • SQL
  • PostgreSQL
  • DuckDB
  • VS Code
  • Git & GitHub

πŸ“Š Progress Tracker

Difficulty Completed
🟒 Easy 32
🟑 Medium 17
πŸ”΄ Hard 1

Overall Progress: 50/ 50

(This table will be updated as I progress through the study plan.)


πŸŽ“ What I Learned

Throughout this challenge, I am improving my understanding of:

  • Writing efficient SQL queries
  • Solving analytical problems
  • Query optimization
  • Window functions
  • Data transformations
  • Business-oriented SQL thinking

πŸš€ Why This Repository?

As an aspiring Data Engineer, I believe SQL is one of the most important technical skills. This repository reflects my commitment to continuous learning and building a strong foundation for designing and analyzing data pipelines.


πŸ“¬ Connect With Me

If you're interested in discussing SQL, Data Engineering, or sharing feedback, feel free to connect with me.

⭐ If you found this repository useful, consider giving it a star!