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

 
 
 

Contributors