Skip to content

Releases: software-development-course-2025/database-design-with-sql-week-2-assignment

🚀 v1.0.0 — Introduction to SQL and Basic Queries

16 Sep 16:45
65e0ea7
Compare
Choose a tag to compare

🚀 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

  1. Retrieve Payment Information
    Query to fetch checkNumber, paymentDate, and amount from the payments table.

  2. Filter and Sort Orders
    Retrieve orderDate, requiredDate, and status from the orders table for orders marked as 'In Process', sorted by orderDate in descending order.

  3. Employee Data Retrieval
    Extract firstName, lastName, and email of employees with the job title 'Sales Rep', ordered by employeeNumber descending.

  4. Retrieve Office Information
    Fetch all columns and records from the offices table to gather details about company locations.

  5. Sort and Limit Products
    Query to select productName and quantityInStock from the products table, sorted by buyPrice ascending, limited to 5 records.

🧠 Features

  • SQL Fundamentals
    Demonstrates core SQL operations including SELECT, WHERE, ORDER BY, and LIMIT.

  • 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

  1. Set Up Your Database
    Ensure you have a running MySQL or PostgreSQL instance with sample data for the following tables: payments, orders, employees, offices, and products.

  2. Execute the Queries
    Open the answers.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.