You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Organize repository for self-guided LeetCode tutorials
This commit introduces a new structure and documentation to transform the repository into a self-guided LeetCode SQL tutorial platform.
Key changes include:
- **Enhanced `README.md`:** Updated the main README with a description of the tutorial format and a "How to Use This Repository" section.
- **`DOCUMENTATION_GUIDE.md`:** Added a new guide that defines a standard structure for individual LeetCode problem files. This includes sections for Problem Title, LeetCode Link, Problem Description, SQL Solution, Explanation, and Key Concepts.
- **Sample File Restructuring:** Reformatted three existing SQL files (`Easy/Ads performance.sql`, `Medium/Active Businesses.sql`, `Hard/Average Salary.sql`) to demonstrate the new documentation structure. These files now include placeholders for detailed explanations and key concepts.
- **`CONTRIBUTING.md`:** Added a new file with guidelines for community contributions, referencing the `DOCUMENTATION_GUIDE.md`.
- **`LICENSE`:** Added an MIT License file to clarify usage rights.
This reorganization aims to make the repository more user-friendly for learning SQL and to provide a consistent framework for documenting solutions.
Thank you for considering contributing to this repository! Your help is appreciated in making this a comprehensive resource for learning SQL through LeetCode problems.
4
+
5
+
## How to Contribute
6
+
7
+
We welcome contributions in various forms:
8
+
9
+
***Adding New Solutions:** If you've solved a LeetCode SQL problem that isn't here yet.
10
+
***Improving Explanations:** If you can provide a clearer or more detailed explanation for an existing solution.
11
+
***Adding Key Concepts:** If you can identify and list relevant SQL concepts for a solution.
12
+
***Fixing Errors:** If you find any errors in problem descriptions, solutions, or explanations.
13
+
14
+
## Contribution Guidelines
15
+
16
+
To ensure consistency and quality, please follow these guidelines:
17
+
18
+
1.**Documentation Standard:** All contributions must adhere to the structure outlined in the `DOCUMENTATION_GUIDE.md`. Please familiarize yourself with it before submitting your changes.
19
+
2.**File Naming:**
20
+
* Use the official LeetCode problem title for the filename, replacing spaces with hyphens (e.g., `Easy/Find-Customers-With-Positive-Revenue-This-Year.sql`).
21
+
* Place the file in the appropriate difficulty directory (`Easy/`, `Medium/`, `Hard/`).
22
+
3.**Problem Information:**
23
+
* Ensure the "Problem Title (from LeetCode)" and "LeetCode Link" sections are accurately filled out.
24
+
4.**Clear Explanations:** If adding or modifying an explanation, make it clear, concise, and easy to understand. Break down complex logic.
25
+
5.**Accurate Key Concepts:** List the primary SQL concepts demonstrated by the solution.
26
+
6.**One Problem Per Pull Request:** If you're submitting multiple new solutions, please create a separate pull request for each problem. This makes reviewing easier.
27
+
28
+
## Setting Up Your Environment (General Guide)
29
+
30
+
1.**Fork the Repository:** Click the 'Fork' button at the top right of this page.
31
+
2.**Clone Your Fork:**`git clone https://github.com/YOUR_USERNAME/SQL-Leetcode-Challenge.git`
32
+
3.**Create a New Branch:**`git checkout -b your-feature-branch-name` (e.g., `add-solution-median-employee-salary`)
33
+
4.**Make Your Changes:** Add your solution or improvements, ensuring you follow the `DOCUMENTATION_GUIDE.md`.
34
+
5.**Commit Your Changes:**`git commit -am "feat: Add solution for Median Employee Salary"` (Follow conventional commit message standards if possible).
35
+
6.**Push to Your Fork:**`git push origin your-feature-branch-name`
36
+
7.**Open a Pull Request:** Go to the original repository page on GitHub and click 'New pull request'.
37
+
38
+
## Code of Conduct
39
+
40
+
While this is a small project, please be respectful and constructive in all communications.
This guide outlines the standard format for documenting SQL LeetCode problems in this repository. Adhering to this structure will ensure consistency and make it easier for users to learn.
4
+
5
+
Each problem solution file should be a Markdown file (`.md`) or a SQL file (`.sql`) that includes Markdown-formatted comments at the top, and should contain the following sections:
6
+
7
+
## Problem Title (from LeetCode)
8
+
9
+
* Clearly state the official title of the LeetCode problem.
10
+
11
+
## LeetCode Link
12
+
13
+
* Provide a direct hyperlink to the problem on the LeetCode website.
0 commit comments