This repository contains my solutions to LeetCode SQL problems, written and tested using Microsoft SQL Server.
Each solution focuses on:
- Correctness β aligned with LeetCodeβs expected results
- Readability β clear SQL formatting and naming
- Performance β where applicable, optimized with proper joins, indexing logic, or CTEs
leetcode_mssql_solution/ βββ easy/ βββ medium/ βββ hard/ βββ README.md
- SQL Engine: Microsoft SQL Server 2019+
- Environment: SQL Server Management Studio (SSMS), Azure Data Studio, or online emulators
Some LeetCode problems may use MySQL syntax. When needed, I adapt them to valid T-SQL for MS SQL Server, using equivalents like:
LIMITβTOP,OFFSET FETCH- Date functions:
GETDATE(),DATEDIFF(),FORMAT() - String functions:
CHARINDEX,LEFT,RIGHT, etc.
Aldyth Nahak
GitHub | LinkedIn
Feel free to fork, star, or suggest improvements!