{"id":25688654,"url":"https://github.com/vidjinnangni/sql-practice-exercise","last_synced_at":"2025-07-04T01:34:36.544Z","repository":{"id":278962202,"uuid":"937294631","full_name":"vidjinnangni/SQL-practice-exercise","owner":"vidjinnangni","description":"This repository contains a structured SQL exercise designed to practice database queries using MySQL. The goal is to enhance SQL skills by solving various database-related challenges.","archived":false,"fork":false,"pushed_at":"2025-02-22T19:48:40.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T21:12:02.690Z","etag":null,"topics":["mysql","mysql-database","sql"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vidjinnangni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-22T19:45:16.000Z","updated_at":"2025-02-22T19:50:42.000Z","dependencies_parsed_at":"2025-02-22T20:38:55.754Z","dependency_job_id":null,"html_url":"https://github.com/vidjinnangni/SQL-practice-exercise","commit_stats":null,"previous_names":["vidjinnangni/sql-practice-exercise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vidjinnangni/SQL-practice-exercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vidjinnangni%2FSQL-practice-exercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vidjinnangni%2FSQL-practice-exercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vidjinnangni%2FSQL-practice-exercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vidjinnangni%2FSQL-practice-exercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vidjinnangni","download_url":"https://codeload.github.com/vidjinnangni/SQL-practice-exercise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vidjinnangni%2FSQL-practice-exercise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263431379,"owners_count":23465516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","mysql-database","sql"],"created_at":"2025-02-24T21:05:10.907Z","updated_at":"2025-07-04T01:34:36.515Z","avatar_url":"https://github.com/vidjinnangni.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Exercise – MySQL Database Queries\n\n## Overview\n\nThis repository contains a structured SQL exercise designed to practice database queries using MySQL. The goal is to enhance SQL skills by solving various database-related challenges. The exercise is based on a predefined database schema, and users are encouraged to write their own SQL queries before checking the provided solutions.\n\n## Files Included\n\n- **`db_schema.sql`** – Contains the SQL script to create and populate the database schema.\n- **`questions.md`** – Lists the SQL exercises to be solved.\n- **`solutions.sql`** – Provides solutions to the exercises.\n\n## How to Use\n\n### Set up the database:\n1. Run `db_schema.sql` in your MySQL database to create and populate the necessary tables.\n2. Ensure your MySQL server is running.\n\n### Attempt the exercises:\nOpen `questions.md` and try to solve each question by writing SQL queries.\n\n### Check solutions:\nCompare your answers with the `solutions.sql` file to see different possible approaches.\n\n## Data Population\n\nThe `db_schema.sql` file not only creates the necessary tables but also inserts sample data into them. For instance:\n\n- **Departments Table**: Contains department names and locations.\n- **Employees Table**: Stores employee details such as name, email, salary, hire date, and department affiliation.\n\n### Example data insertion:\n```sql\nINSERT INTO Departments (department_name, location_id) VALUES \n('Marketing', 180),\n('Purchasing', 1700),\n('Human Resources', 2400),\n('Shipping', 1500);\n\nINSERT INTO Employees (first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id)\nVALUES \n('Steven', 'King', 'sking@example.com', '515.123.4567', '1987-06-17', 'AD_PRES', 24000.00, NULL, NULL, 1),\n('Neena', 'Kochhar', 'nkochhar@example.com', '515.123.4568', '1989-11-21', 'AD_VP', 17000.00, NULL, 1, 1);\n```\n\nThis ensures that you can immediately start querying data.\n\n## Prerequisites\n- MySQL installed and configured.\n- A basic understanding of SQL queries and database management.\n- A database tool such as MySQL Workbench, DBeaver, or the MySQL command-line interface.\n\n## Contributing\n\nIf you have suggestions, improvements, or additional exercises, feel free to open a pull request.\n\n## License\n\nThis project is open-source under the MIT License. Feel free to use and modify it as needed.\n\n---\nHappy coding! 🚀","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidjinnangni%2Fsql-practice-exercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvidjinnangni%2Fsql-practice-exercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidjinnangni%2Fsql-practice-exercise/lists"}