Welcome to my SQL for Data Analysis repository!
This repo contains a curated collection of SQL Server scripts developed during my journey through data analytics training.
π οΈ It includes hands-on exercises and mini-projects that simulate real-world data tasks such as:
- β Data cleaning & transformation
- π§© Joins & subqueries
- π Business analysis
- π Control flow & procedures
- π Security configurations
- π§± Normalization & relational design
All scripts are written in T-SQL and tested in SQL Server Management Studio (SSMS).
These scripts cover basic queries, control flow, normalization, and logic development for SQL Server learners.
| File | Description |
|---|---|
basic_sql_practice.sql |
Basic syntax: INSERT, CASE, JOINS, IF/ELSE, WHILE, LEN |
sql_system_and_insert_practice.sql |
System views, table creation, multi-row inserts, language settings |
sql_flow_and_union_practice.sql |
Loops with GOTO, conditional updates, RAND(), and UNION |
restaurant_lab_practice2.sql |
Restaurant + HR schema: keys, views, XML, stored procs |
sql_lab_practice.sql |
Normalization (1NF/2NF), constraints, indexing, user roles |
Real-world practices in database encryption, auditing, and user management.
| File | Description |
|---|---|
security_audit.sql |
Auditing roles, encryption keys, secure connection verification |
security_and_users.sql |
TDE, value encryption, role management, user creation |
- Microsoft SQL Server 2016 or later
- SQL Server Management Studio (SSMS)
- Optional: AdventureWorks or personal dataset
---Feel free to fork, adapt, and learn from these scripts. Contributions and feedback are always welcome!