This repository contains a comprehensive collection of SQL scripts and queries performed on the Microsoft AdventureWorks sample database. The project demonstrates advanced data retrieval, manipulation, and analysis techniques used in real-world business scenarios.
The goal of this project is to showcase proficiency in T-SQL by solving business problems related to sales, inventory, and customer management for a large-scale manufacturing company.
The queries are organized into logical modules based on SQL operations:
| Directory | Description |
|---|---|
Aggregation |
Summary statistics using GROUP BY, SUM, AVG, and HAVING clauses. |
Join |
Multi-table relational queries using INNER, LEFT, and CROSS JOINS. |
SubQuery |
Complex data filtering using nested queries and correlated subqueries. |
Views |
Implementation of virtual tables for simplified data access and security. |
Update & Delete |
Data manipulation scripts for maintaining database integrity. |
- Relational Mapping: Connecting Sales, Production, and Person schemas.
- Data Aggregation: Calculating KPIs like total revenue and average order value.
- Nested Logic: Using Subqueries to isolate specific data segments.
- Performance Patterns: Writing clean, readable, and optimized T-SQL code.
- Database: You will need the
AdventureWorksbackup file from Microsoft's official documentation. - Environment: Best executed in SQL Server Management Studio (SSMS) or Azure Data Studio.
- Execution: Open the
.sqlfiles and execute them against your local instance of the AdventureWorks database.
This repository serves as a professional SQL Portfolio. Feedback and contributions are welcome!