A collection of SQL basics, including table creation, data insertion, and query examples for retrieving and analyzing employee data. Covers filtering, grouping, sorting, and pattern matching. This repository aims to help beginners learn essential SQL concepts for working with relational databases.
This repository contains a collection of SQL queries and functions designed for beginners. It includes examples for:
- Table Creation: Creating tables with basic data types and constraints.
- Data Insertion: Inserting sample data into tables.
- Data Retrieval: Using SELECT queries to retrieve data.
- Basic SQL Operations: Filtering, sorting, grouping, and pattern matching.
SQL code for creating and inserting data into EmployeeDemographics
and EmployeeSalary
tables, followed by queries for retrieving and analyzing employee data.
SQL code for creating EmployeeDemographics
and EmployeeSalary
tables.
Sample data inserted into the EmployeeDemographics
and EmployeeSalary
tables.
Queries to:
- Select all employees
- Select unique genders
- Count employees by gender
- Filter by age and gender
- Sort employees by age and gender
- Perform pattern matching on last name
Feel free to fork this repository, submit pull requests, or open issues to improve the content or add new SQL queries.
This repository is open source and available under the MIT License.