{"id":27143157,"url":"https://github.com/hifza-khalid/sql-queries-collection","last_synced_at":"2025-07-14T16:37:07.501Z","repository":{"id":286400252,"uuid":"961298827","full_name":"Hifza-Khalid/SQL-Queries-Collection","owner":"Hifza-Khalid","description":"🗂️A collection of essential SQL queries covering SELECT 📝, INSERT ➕, DELETE ❌, UPDATE 🔄, and JOIN 🔗 operations for database management and learning.","archived":false,"fork":false,"pushed_at":"2025-04-06T08:12:21.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T03:04:44.045Z","etag":null,"topics":["database","queries","sql","sql-commands","sql-queries"],"latest_commit_sha":null,"homepage":"https://github.com/Hifza-Khalid/SQL-Queries-Collection","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/Hifza-Khalid.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-04-06T07:57:24.000Z","updated_at":"2025-04-13T09:48:01.000Z","dependencies_parsed_at":"2025-04-06T08:39:46.470Z","dependency_job_id":null,"html_url":"https://github.com/Hifza-Khalid/SQL-Queries-Collection","commit_stats":null,"previous_names":["hifza-khalid/sql-queries-collection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hifza-Khalid/SQL-Queries-Collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hifza-Khalid%2FSQL-Queries-Collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hifza-Khalid%2FSQL-Queries-Collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hifza-Khalid%2FSQL-Queries-Collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hifza-Khalid%2FSQL-Queries-Collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hifza-Khalid","download_url":"https://codeload.github.com/Hifza-Khalid/SQL-Queries-Collection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hifza-Khalid%2FSQL-Queries-Collection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265319565,"owners_count":23746363,"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":["database","queries","sql","sql-commands","sql-queries"],"created_at":"2025-04-08T08:32:25.575Z","updated_at":"2025-07-14T16:37:07.442Z","avatar_url":"https://github.com/Hifza-Khalid.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Queries Collection\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/Hifza-Khalid/SQL-Queries-Collection)](https://github.com/Hifza-Khalid/SQL-Queries-Collection/stargazers) ⭐\n[![GitHub forks](https://img.shields.io/github/forks/Hifza-Khalid/SQL-Queries-Collection)](https://github.com/Hifza-Khalid/SQL-Queries-Collection/network) 🍴\n[![GitHub issues](https://img.shields.io/github/issues/Hifza-Khalid/SQL-Queries-Collection)](https://github.com/Hifza-Khalid/SQL-Queries-Collection/issues) 🐞\n\nWelcome to the **SQL Queries Collection** repository! 🎉 This repository contains a collection of SQL queries for a variety of common operations and tasks, such as `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and `JOIN` operations, which are fundamental to working with SQL databases. The goal of this project is to provide practical SQL code examples for easy learning and reference. 🚀\n\n---\n\n## Table of Contents\n\n\u003cdetails\u003e\n\u003csummary\u003e🔽 Click to expand Table of Contents\u003c/summary\u003e\n\n- [Project Overview](#project-overview)  \n- [Queries Collection](#queries-collection)  \n  - [SELECT Queries](#select-queries)  \n  - [JOIN Queries](#join-queries)  \n  - [INSERT Queries](#insert-queries)  \n  - [UPDATE Queries](#update-queries)  \n  - [DELETE Queries](#delete-queries)  \n- [Contributing](#contributing)  \n- [License](#license)  \n- [Links](#links)\n\n\u003c/details\u003e\n\n---\n\n## Project Overview\n\nThis project is designed to help developers and learners with SQL queries. It contains organized SQL query files that can be used in your projects or as learning examples. Whether you're just starting with SQL or you need a quick reference, you'll find useful query examples here. The repository is open for contribution, so feel free to add your own queries or improvements. 📚\n\n---\n\n## Queries Collection\n\n### \u003cdetails\u003e\n\u003csummary\u003e📊 SELECT Queries\u003c/summary\u003e\n\nThis file contains examples of various `SELECT` statements that are fundamental for retrieving data from a database. 📝\n\n- **Basic SELECT**: Retrieve all records from a table.  \n- **WHERE Clause**: Filter data based on conditions.  \n- **AND/OR Conditions**: Combine multiple conditions.  \n- **LIKE Pattern Matching**: Search for records with specific patterns.  \n- **ORDER BY**: Sort the results.  \n- **DISTINCT**: Retrieve unique values.  \n- **JOIN Queries**: Combine data from multiple tables.\n\nExample:\n```sql\nSELECT * FROM employees;\n```\n\nYou can find more details in the [SELECT-Queries.sql](SELECT-Queries.sql) file. 📄\n\n\u003c/details\u003e\n\n### \u003cdetails\u003e\n\u003csummary\u003e🔗 JOIN Queries\u003c/summary\u003e\n\nThis file demonstrates different types of `JOIN` operations for combining data from multiple tables. 🌐\n\n- **INNER JOIN**: Returns rows when there is a match in both tables.  \n- **LEFT JOIN**: Returns all rows from the left table and matched rows from the right table.  \n- **RIGHT JOIN**: Returns all rows from the right table and matched rows from the left table.  \n- **FULL OUTER JOIN**: Returns all rows when there is a match in one of the tables.  \n- **SELF JOIN**: Join a table with itself.\n\nExample:\n```sql\nSELECT e.first_name, e.last_name, d.department_name\nFROM employees e\nINNER JOIN departments d ON e.department_id = d.department_id;\n```\n\nFor more details, refer to the [JOIN-Queries.sql](JOIN-Queries.sql) file. 📑\n\n\u003c/details\u003e\n\n### \u003cdetails\u003e\n\u003csummary\u003e➕ INSERT Queries\u003c/summary\u003e\n\nThis file covers examples of `INSERT` queries for adding data into a table. ✨\n\n- **Single INSERT**: Add a single record to a table.  \n- **Multiple INSERT**: Add multiple records at once.  \n- **INSERT from SELECT**: Insert data from another table.\n\nExample:\n```sql\nINSERT INTO employees (first_name, last_name, department, salary)\nVALUES ('John', 'Doe', 'IT', 60000);\n```\n\nFor more information, refer to the [INSERT-Queries.sql](INSERT-Queries.sql) file. 📝\n\n\u003c/details\u003e\n\n### \u003cdetails\u003e\n\u003csummary\u003e✏️ UPDATE Queries\u003c/summary\u003e\n\nThis file demonstrates the use of `UPDATE` queries to modify data in an existing table. 🔄\n\n- **Basic UPDATE**: Update a single record.  \n- **Multiple Record UPDATE**: Modify data for multiple records.  \n- **UPDATE with JOIN**: Modify data based on a JOIN condition.  \n- **Conditional UPDATE**: Update data conditionally using `CASE`.\n\nExample:\n```sql\nUPDATE employees\nSET salary = 65000\nWHERE first_name = 'John' AND last_name = 'Doe';\n```\n\nCheck the [UPDATE-Queries.sql](UPDATE-Queries.sql) file for further examples. 🔄\n\n\u003c/details\u003e\n\n### \u003cdetails\u003e\n\u003csummary\u003e🗑️ DELETE Queries\u003c/summary\u003e\n\nThis file includes various `DELETE` queries for removing data from a table. 🗃️\n\n- **Basic DELETE**: Remove a specific record.  \n- **DELETE Multiple Records**: Delete records based on a condition.  \n- **DELETE with JOIN**: Delete records based on a JOIN condition.  \n- **TRUNCATE**: Remove all records from a table.\n\nExample:\n```sql\nDELETE FROM employees\nWHERE first_name = 'John' AND last_name = 'Doe';\n```\n\nMore examples can be found in the [DELETE-Queries.sql](DELETE-Queries.sql) file. 🗃️\n\n\u003c/details\u003e\n\n---\n\n## Contributing\n\nWe welcome contributions from the community! 🤝 If you'd like to contribute, please follow these steps:\n\n1. Fork the repository 🍴.  \n2. Create a new branch (`git checkout -b feature-name`) 🌱.  \n3. Make your changes ✨.  \n4. Commit your changes (`git commit -am 'Add new query'`) 📝.  \n5. Push to your branch (`git push origin feature-name`) 🚀.  \n6. Open a pull request 🔄.  \n\nPlease ensure that your contributions are in the form of SQL code examples with proper comments explaining the query logic. 💬\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 📜\n\n---\n\n## Links\n\n- [Repository URL](https://github.com/Hifza-Khalid/SQL-Queries-Collection) 🔗  \n- [MIT License](https://opensource.org/licenses/MIT) 📝  \n- [SQL Documentation](https://www.w3schools.com/sql/) 📚  \n- [SQL Cheat Sheet](https://www.sqltutorial.org/sql-cheat-sheet/) 📖\n\nFeel free to use, modify, and contribute to this collection of SQL queries. Happy querying! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhifza-khalid%2Fsql-queries-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhifza-khalid%2Fsql-queries-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhifza-khalid%2Fsql-queries-collection/lists"}