🎉 Welcome to the Advanced SQL & Data Management A-Z repository! This repository contains comprehensive SQL scripts, projects, and best practices for mastering SQL and database management.
- SQL Basics: SELECT, WHERE, filtering, and basic functions.
- Intermediate SQL: JOINs, GROUP BY, subqueries, and string functions.
- Advanced SQL: Window functions, PIVOT/UNPIVOT, regular expressions (RegEx), and stored procedures.
- Employee Management Project: Custom database project demonstrating full database creation, normalization, and data manipulation.
- Final Projects: Real-world business projects, including data preparation for machine learning (ML).
- MySQL Workbench (for MySQL projects)
- PostgreSQL and PgAdmin 4 (optional)
- Basic knowledge of SQL (ideal but not required)
Learn the basics of SQL including SELECT, WHERE, and basic filtering.
DDL(S1).sql— Data Definition Language.DML+DQL(S1).sql— Data Manipulation and Query Languages.
Dive into JOINs, GROUP BY, HAVING, subqueries, and string functions.
Aggregate_Functions(S2).sql— Working with aggregate functions such asSUM(),AVG(), etc.ReGeXP_Practice(S2).sql— Regular expressions and pattern matching.GROUP_BY_Practice_+_Comments(S2).sql— Grouping data withGROUP BY.SubQuery(S2).sql— Example of subqueries.SELECT_Disign(S2).sql— Advanced select query examples.String_Functions(S2).sql— Functions for string manipulation.
Explore complex SQL topics including window functions, PIVOT, and query optimization.
Window_Functions(S3).sql— Using window functions for advanced data analysis.PIVOT_in_MYSQL(S3).sql— Pivoting data in SQL.UNPIVOT_in_MYSQL(S3).sql— Unpivoting data in SQL.Indexes(S3).sql— Creating and using indexes for optimization.Query_Optimization_Techniques(S3).sql— Tips for optimizing SQL queries.Stored_Procedures(S3).sql— Creating and using stored procedures.View(S3).sql— Working with SQL views.
This section demonstrates the full development of an Employee Management Database. The project includes database creation, normalization checks, data manipulation practices, and full-featured database management.
Scrip_Employee_Management_Database.sql— Initial structure of the Employee Management database.Scrip_Employee_Management_Check_Normalization_Forms.sql— Demonstration of normalization forms (1NF, 2NF, 3NF).Scrip_Employee_Management_DML_Practice_Insert.sql— Practical examples ofINSERT,UPDATE, andDELETEfor the Employee Management database.Scrip_Employee_Management_Full_Features.sql— Full-featured database management script with validation and stored procedures.
Real-world projects, including data preparation for machine learning.
Final_Project_Script_part_1(S1).sql— First part of the final project scripts, involving core SQL concepts.Final_Project_Script_part_2(S2).sql— Second part of the final project, including intermediate SQL techniques.Final_Project_Script_part_3(S3).sql— Third part of the project, using advanced SQL concepts.Final_Project_Script_data_prep_for_ML(S4).sql— Final part focusing on preparing the data for machine learning.
This folder contains ER diagrams that visually represent the database structures used in various projects.
- ER_Diagram_Classsicmodels.mwb — Classic Models database diagram.
- ER_Diagram_Employee_Management.mwb — Employee Management database diagram.
You can open these diagrams using MySQL Workbench to view the structure and relationships between tables in each database.
This folder contains additional advanced SQL scripts that demonstrate complex concepts and techniques. These scripts are organized by theme and can be useful for deepening your understanding of SQL:
- COMMON TABLE EXPRESSION (CTE).sql — Demonstrates the use of CTEs in SQL.
- Re-answering_Business_Questions.sql — Answering complex business questions using SQL.
- ReDDL_DML_TCL_DQL_DCL.sql — Covers DDL, DML, TCL, and DCL practices.
- Understanding_JOINS.sql — Explains various types of SQL
JOINswith examples. - Window_CTE_Views_StoredProc.sql — A comprehensive script combining window functions, CTEs, views, and stored procedures.
- Clone this repository:
git clone https://github.com/evgeniimatveev/Advanced_SQL_Data_Management_A-Z.git - Open MySQL Workbench or your preferred SQL client.
- Navigate to the relevant project section, and run the SQL scripts in your database.
SQL is a critical skill for anyone involved in data analysis, database management, or data science. This repository will help you:
- Analyze and manipulate large datasets efficiently.
- Design and manage scalable databases.
- Prepare data for advanced analytics, including machine learning.
We welcome contributions to improve this repository! Here’s how you can get involved:
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature. - Make changes and commit:
git commit -m 'Add new feature'. - Push to the branch:
git push origin feature/new-feature. - Submit a pull request.
Happy coding! 🚀