Skip to content

Gowthamch9/MSSQL_Queries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—„οΈ MSSQL_Queries

This repository contains SQL practice queries and complex business use case queries written in Microsoft SQL Server (MSSQL) using the AdventureWorks2019 sample database.

It showcases my ability to write optimized SQL queries for data analysis, reporting, and business decision-making.


πŸ“‚ Repository Structure

  • SQL Practice Files. β†’ Contains basic to intermediate queries for practice (SELECT, WHERE, GROUP BY, ORDER BY, etc.).
  • Complex Queries β†’ Contains advanced SQL queries solving real-world business scenarios.

πŸ› οΈ Key SQL Concepts Demonstrated

πŸ“˜ Basic to Intermediate

  • Filtering with WHERE and sorting with ORDER BY
  • Aggregations: SUM, AVG, COUNT, MIN, MAX
  • Joins: INNER, LEFT, RIGHT, FULL OUTER
  • Subqueries & Common Table Expressions (CTEs)

πŸ“— Advanced SQL Functions & Keywords

  • Window Functions:
    ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE(), LAG(), LEAD(), Running Totals

  • Recursive CTEs:
    Useful for hierarchical data like org charts and category trees.

  • CROSS APPLY / OUTER APPLY:
    Joining with subqueries or table-valued functions.

  • PIVOT & UNPIVOT:
    Transforming rows into columns and vice versa.

  • String & Date Functions:
    STRING_AGG(), FORMAT(), DATEPART(), DATENAME()

  • Stored Procedures, Views & Functions:
    Encapsulating business logic into reusable modules.

πŸ’Ύ Advanced Use Cases

  • Identifying Products Sales Status
  • Identifying Top 3 sales in each territory
  • Identifying Top 3 avg monthly quantity sold in each territory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages