Skip to content

evgeniimatveev/Advanced-SQL-Data-Management-A-Z

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation


Advanced SQL & Data Management A-Z 💻

🎉 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.

📚 What You Will Learn:

  • 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).

🛠️ Tools & Requirements:

  • MySQL Workbench (for MySQL projects)
  • PostgreSQL and PgAdmin 4 (optional)
  • Basic knowledge of SQL (ideal but not required)

📂 Project Structure:

Section 1: SQL Basics

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.

Section 2: Intermediate SQL

Dive into JOINs, GROUP BY, HAVING, subqueries, and string functions.

  • Aggregate_Functions(S2).sql — Working with aggregate functions such as SUM(), AVG(), etc.
  • ReGeXP_Practice(S2).sql — Regular expressions and pattern matching.
  • GROUP_BY_Practice_+_Comments(S2).sql — Grouping data with GROUP BY.
  • SubQuery(S2).sql — Example of subqueries.
  • SELECT_Disign(S2).sql — Advanced select query examples.
  • String_Functions(S2).sql — Functions for string manipulation.

Section 3: Advanced SQL

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.

Section 4: Employee Management Project

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 of INSERT, UPDATE, and DELETE for the Employee Management database.
  • Scrip_Employee_Management_Full_Features.sql — Full-featured database management script with validation and stored procedures.

Section 5: Final Projects

Real-world projects, including data preparation for machine learning.

  • Final_Project_Script_part_1(S1).sqlFirst part of the final project scripts, involving core SQL concepts.
  • Final_Project_Script_part_2(S2).sqlSecond part of the final project, including intermediate SQL techniques.
  • Final_Project_Script_part_3(S3).sqlThird part of the project, using advanced SQL concepts.
  • Final_Project_Script_data_prep_for_ML(S4).sqlFinal part focusing on preparing the data for machine learning.

ER Diagrams:

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.


ADVANCED SQL SCRIPTS (ORIGINAL):

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 JOINs with examples.
  • Window_CTE_Views_StoredProc.sql — A comprehensive script combining window functions, CTEs, views, and stored procedures.

🛠️ Setup & Installation:

  1. Clone this repository:
    git clone https://github.com/evgeniimatveev/Advanced_SQL_Data_Management_A-Z.git
  2. Open MySQL Workbench or your preferred SQL client.
  3. Navigate to the relevant project section, and run the SQL scripts in your database.

🎓 Why Master SQL?

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.

🏆 Contributing

We welcome contributions to improve this repository! Here’s how you can get involved:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/new-feature.
  3. Make changes and commit: git commit -m 'Add new feature'.
  4. Push to the branch: git push origin feature/new-feature.
  5. Submit a pull request.

Happy coding! 🚀

About

Advanced SQL in MySQL 8.0: window functions, pivot tables, regex, stored procedures, employee management project, ML data prep

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages