Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CUSTOMER (CustomerNumber, CustomerName, Phone) COURSE (CourseNumber, Course, CourseDate, Fee) ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) where CustomerNumber in ENROLLMENT must exist in CustomerNumber in CUSTOMER CourseNumber in

CUSTOMER (CustomerNumber, CustomerName, Phone)

COURSE (CourseNumber, Course, CourseDate, Fee)

ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid)

where

CustomerNumber in ENROLLMENT must exist in CustomerNumber in CUSTOMER

CourseNumber in ENROLLMENT must exist in CourseNumber in COURSE

Write SQL queries to produce the following results:

1) List all students and courses they are registered for. Include, in this order, CustomerNumber, CustomerName, Phone, CourseNumber, and AmountPaid.

2) List the total amount paid for each course starting after July 4, 2009. Include, in this order, CourseNumber, CourseName, and total amount paid for that course.

3) List the average amount paid for each customer. Include, in this order, CustomerName and average amount paid by that customer.

4) List all students registered in the Adv. Pastels starting on October 1, 2009. Include, in this order, CourseName, CourseDate, Fee, CustomerName, and Phone.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions