SQL Final Exam Solution: Northwind Database Queries and Table Creation
VerifiedAdded on 2022/10/06
|3
|777
|265
Homework Assignment
AI Summary
This document presents a comprehensive solution to a SQL final exam. The assignment focuses on querying the Northwind database to retrieve specific information using various SQL commands, including subqueries to find products never ordered, selecting customers based on specific criteria, calculating employee salaries, listing top product prices, and filtering customers based on region. The solution also includes a script to create several tables for a university database, demonstrating database design principles, including primary and foreign key relationships. The document also contains explanations of the purpose of the enrollment table and addresses potential errors in the original script, providing corrected SQL code. Finally, it includes an extra credit section on calculating employee compensation based on sales and commissions.
1 out of 3