๐ First Release โ Introduction to SQL and Basic Queries
This release delivers the solutions for the Introduction to SQL and Basic Queries assignment. It includes a curated set of SQL queries designed to retrieve, filter, sort, and limit data across multiple tables within a relational database.
โ Tasks Covered
-
Retrieve Payment Information
Query to fetchcheckNumber
,paymentDate
, andamount
from thepayments
table. -
Filter and Sort Orders
RetrieveorderDate
,requiredDate
, andstatus
from theorders
table for orders marked as'In Process'
, sorted byorderDate
in descending order. -
Employee Data Retrieval
ExtractfirstName
,lastName
, andemail
of employees with the job title'Sales Rep'
, ordered byemployeeNumber
descending. -
Retrieve Office Information
Fetch all columns and records from theoffices
table to gather details about company locations. -
Sort and Limit Products
Query to selectproductName
andquantityInStock
from theproducts
table, sorted bybuyPrice
ascending, limited to 5 records.
๐ง Features
-
SQL Fundamentals
Demonstrates core SQL operations includingSELECT
,WHERE
,ORDER BY
, andLIMIT
. -
Sorting and Filtering
Learn how to refine query results using conditions and sorting mechanisms. -
Multi-Table Data Access
Gain experience querying multiple tables with targeted data extraction.
๐ ๏ธ Technologies Used
- SQL โ Structured Query Language
- MySQL / PostgreSQL โ Compatible relational database engines
- GitHub โ Version control and collaboration
โถ๏ธ How to Run
-
Set Up Your Database
Ensure you have a running MySQL or PostgreSQL instance with sample data for the following tables:payments
,orders
,employees
,offices
, andproducts
. -
Execute the Queries
Open theanswers.sql
file in your preferred SQL editor (e.g., MySQL Workbench, pgAdmin) and run each query individually to view the results.
๐ฎ Future Updates
- Additional tasks involving joins across multiple tables
- Advanced queries using aggregate functions (
COUNT
,SUM
,AVG
, etc.) - Performance improvements and error handling enhancements
๐ License
This repository is intended for educational use and is freely available for learning, experimentation, and reference.