Skip to content

Shamkumar24/SQL-Workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SQL Workshop – Practice Queries & Data Migration Contest

Overview

This repository contains my SQL work completed during an SQL Workshop. All queries were practiced using SQL Server Management Studio (SSMS) on a college-provided SQL Server database (AdventureWorks type).

The purpose of this repository is to showcase my understanding of SQL concepts, query writing, and data migration logic.


Files in This Repository

1. sql_queries.sql

This file contains my SQL practice queries, which include:

  • Basic SELECT queries
  • WHERE conditions and filtering
  • LIKE patterns
  • NULL and NOT NULL checks
  • ORDER BY sorting
  • IN, NOT IN, BETWEEN
  • TOP and OFFSET–FETCH
  • INSERT statements
  • String functions (CONCAT, SUBSTRING, UPPER, LOWER)
  • Date functions (GETDATE, DATEADD, DATEDIFF)
  • Aggregate functions (COUNT)
  • GROUP BY and HAVING
  • Window function (ROW_NUMBER)

These queries helped me understand how to retrieve and manipulate data from multiple tables using SQL Server.


2. sql_data_migration_contest.sql

This file contains the solution for the Data Migration Contest question.

In this task, customer data was migrated into a new table called CustomerMigration with proper cleaning and transformation.

Key points covered in this file:

  • Full problem statement included as SQL comments
  • Creation of CustomerMigration table with appropriate data types
  • Primary key and UNIQUE constraints
  • Default value for CreatedDate
  • Non-clustered index on LoginName
  • Data migration from multiple source tables:
    • Sales.Customer
    • Person.Person
    • Person.EmailAddress
  • Data transformations such as:
    • FullName creation
    • LoginName extraction from EmailAddress
    • YearsOfExperience calculation
  • Filtering customers from the year 2008 onwards
  • Stored procedure implementation with transaction handling (COMMIT and ROLLBACK)

Tools Used

  • SQL Server Management Studio (SSMS)
  • Microsoft SQL Server
  • GitHub

Important Note

All queries in this repository are written for Microsoft SQL Server. They may not work in MySQL or other database systems due to syntax and schema differences.


Author

Shamkumar M

About

SQL workshop practice queries and data migration contest using SSMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages