Skip to content

Ayushi0214/SQL-Practice-Questions

Repository files navigation

SQL-Practice-Questions

Welcome to the SQL Practice Repository 🎉

This repo is designed to solve a very common problem faced by students and professionals learning SQL: 👉 On platforms like HackerRank or LeetCode, it’s difficult to find topic-specific questions. 👉 Practical, business-use case problems are often missing.

This repository is built to give you structured, topic-wise practice on a real dataset with questions that are both interview-oriented and practical for analytics projects.

📂 Repository Structure

Dataset

A dataset designed around sales, customers, products, orders, and returns.

Download Dataset Here (https://github.com/Ayushi0214/SQL-Practice-Questions/blob/main/boat_sales_mysql.sql)

Questions

Topic-wise SQL questions in separate files, for example:

01_basic_select.sql

02_like_regex.sql

03_string_functions.sql

04_date_time_functions.sql

05_numeric_functions.sql

06_groupby_having_where.sql

07_joins.sql

08_self_join.sql

09_union_intersect_except.sql

10_case_operator.sql

11_subqueries.sql

12_window_functions.sql

13_ctes.sql

Solutions (coming soon)

Step-by-step SQL solutions for each question.

🧑‍💻 Concepts Covered

✔ Basic SELECT & Filtering (WHERE, IN, BETWEEN, LIKE, REGEXP) ✔ Sorting & Limiting (ORDER BY, LIMIT) ✔ String, Date/Time, and Numeric Functions ✔ GROUP BY & HAVING ✔ Joins (Inner, Left, Right, Cross) and Self Joins ✔ UNION, INTERSECT, EXCEPT ✔ CASE Operator & Transpose-style outputs ✔ Subqueries (scalar, correlated, IN/EXISTS, Top-N problems) ✔ Window Functions (Ranking, Running Totals, Moving Averages, NTILE, LAG/LEAD) ✔ CTEs (Common Table Expressions) and Recursive CTEs

🎯 Why this Repo?

Practice topic-wise SQL instead of scattered questions.

Solve realistic business scenarios (not just academic puzzles).

Prepare for SQL interviews with practical case studies.

✨ I’ll keep updating this repo with more questions and the answer key. If you find it useful, feel free to ⭐ star the repository!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published