This repository contains a collection of Transact-SQL (T-SQL) queries and database operations created while learning SQL Server. It demonstrates fundamental and intermediate database concepts through practical, runnable examples.
- About the Project
- SQL Topics Covered
- Project Structure
- Getting Started
- Development Workflow
- Contributing
- Contact
- License
This project was created to understand database management, data manipulation, and complex query structures. It includes DDL and DML commands, functions, and relational database designs suitable for various scenarios.
- Developer: Haluk Can SARIÖZ
- Database: Microsoft SQL Server (T-SQL)
- Purpose: Practice SQL Server query writing and database operations
- Total Samples: 9 structured T-SQL query files + additional resources
The main topics you'll find in this repository are:
| Category | Examples |
|---|---|
| CRUD Operations | SELECT, INSERT, UPDATE, DELETE |
| Database & Table Operations (DDL) | CREATE, ALTER, DROP, TRUNCATE |
| Filtering & Sorting | WHERE, ORDER BY, GROUP BY, HAVING |
| Joins | INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN |
| Subqueries | Nested SELECT statements, correlated subqueries |
| Advanced Structures | Views, Triggers, Stored Procedures, Functions |
| Aggregate Functions | COUNT, SUM, AVG, MIN, MAX |
SQL-Samples/
├── SQL-Kaynaklar/ # Additional SQL resource files and references
├── SQLQuery1.sql # Query example 1
├── SQLQuery2.sql # Query example 2
├── SQLQuery3.sql # Query example 3
├── SQLQuery4.sql # Query example 4
├── SQLQuery5.sql # Query example 5
├── SQLQuery6.sql # Query example 6
├── SQLQuery7.sql # Query example 7
├── SQLQuery8.sql # Query example 8
├── SQLQuery9.sql # Query example 9
├── .gitattributes # Git configuration file
├── LICENSE # MIT License
└── README.md # Project documentation
- SQL Server (any recent version) or Azure Data Studio
- Alternatively: SQL Server Management Studio (SSMS), DBeaver, or DataGrip
- Git
1. Clone the repository:
git clone https://github.com/halukcansarioz/SQL-Samples.git2. Navigate to the project directory:
cd SQL-Samples3. Open any .sql file in your preferred SQL client (SSMS, Azure Data Studio, DBeaver, DataGrip, etc.) and execute the queries against your SQL Server instance.
When adding a new SQL example or updating existing queries, you can follow these steps:
First, fork the repository to your own GitHub account.
Creating a new branch for each feature or fix keeps things organized:
git checkout -b feature/new-sql-queryAfter making and committing your changes, push the branch to GitHub:
git push origin feature/new-sql-queryContributions are welcome! Feel free to submit a pull request.
- Fork this repository.
- Create a branch (
git checkout -b feature/join-examples). - Make your changes and commit them.
- Push your code (
git push origin feature/join-examples). - Open a Pull Request.
Haluk Can Sarıöz
- GitHub: @halukcansarioz
- Email: halukcansarioz19@gmail.com
- LinkedIn: Haluk Can Sarıöz
If you find this project helpful, please ⭐ the repository!
This project is licensed under the MIT License. Feel free to use and modify it as you wish.