Releases: software-development-course-2025/database-design-with-sql-week-2-assignment
🚀 v1.0.0 — Introduction to SQL and Basic Queries
🚀 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.