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.
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.
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
CustomerMigrationtable 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)
- SQL Server Management Studio (SSMS)
- Microsoft SQL Server
- GitHub
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.
Shamkumar M