Skip to content

Manojsv20/Structured_query_language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Structured Query Language (SQL) Project

This repository contains a comprehensive collection of SQL queries, concepts, and practical implementations developed to strengthen database querying and data analysis skills. The project focuses on real-world business scenarios, including sales analysis, forecasting, error metrics, joins, window functions, and performance optimization.


πŸš€ Project Overview

The primary goal of this project is to demonstrate:

  • Strong understanding of SQL fundamentals and advanced concepts
  • Ability to work with large datasets
  • Practical use of SQL in data analysis and reporting
  • Query optimization using indexes and window functions

The database used in this project is sourced from a realistic business dataset and is suitable for analytics-based use cases.


πŸ—‚οΈ Database Description

The project uses multiple fact and dimension tables, including but not limited to:

  • fact_sales_monthly
  • fact_forecast_monthly
  • fact_act_est
  • dim_product
  • dim_customer

These tables simulate real-world business operations such as sales transactions, demand forecasting, and customer-product relationships.


πŸ› οΈ SQL Concepts Covered

  • βœ… Basic SQL Queries (SELECT, WHERE, ORDER BY)
  • βœ… Aggregate Functions (SUM, COUNT, AVG, ABS)
  • βœ… Joins
    • INNER JOIN
    • LEFT JOIN
    • RIGHT JOIN
    • FULL OUTER JOIN (using UNION)
  • βœ… Subqueries & Common Table Expressions (CTEs)
  • βœ… Window Functions
    • OVER()
    • PARTITION BY
    • DENSE_RANK()
  • βœ… Grouping & Aggregation
  • βœ… Error Metrics Calculation
    • Net Error
    • Absolute Error
    • Percentage Error
  • βœ… Indexing & Performance Optimization
  • βœ… Query Debugging and Optimization

πŸ“ˆ Sample Use Cases Implemented

  • Top N products by division using window functions
  • Sales vs Forecast comparison analysis
  • Forecast accuracy and error percentage calculation
  • Customer and product-level performance analysis
  • Handling large datasets efficiently using indexes

βš™οΈ Tools & Technologies

  • Database: MySQL
  • Language: SQL
  • Environment: MySQL Workbench
  • Version Control: Git & GitHub

πŸ“Œ How to Use This Repository

  1. Clone the repository:
    git clone https://github.com/Manojsv20/Structured_query_language.git

Import the database into MySQL

Execute the SQL scripts provided

Analyze and modify queries as required

🎯 Learning Outcomes Gained hands-on experience with complex SQL queries

Improved understanding of data analysis using SQL

Learned query optimization techniques

Applied SQL concepts to real-world datasets

πŸ‘€ Author Manoj S V B.E – Signal Processing Velammal College of Engineering and Technology

πŸ“„ License This project is intended for learning and educational purposes.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published