Reference no: EM132213891
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.
COURSE
CourseNumber | Course | CourseDate | Fee |
1 |
Adv Pastels |
10/1/2009 |
$500.00 |
2 |
Beg Oils |
9/15/2009 |
$350.00 |
3 |
Int Pastels |
3/15/2009 |
$350.00 |
4 |
Beg Oils |
10/15/2009 |
$350.00 |
5 |
Adv Pastels |
11/15/2009 |
$500.00 |
CUSTOMER
CustomerNumber | CustomerLastName | CustomerFirstName | Phone |
1 |
Johnson |
Ariel |
206-567-1234 |
2 |
Green |
Robin |
425-678-8765 |
3 |
Jackson |
Charles |
360-789-3456 |
4 |
Pearson |
Jeffery |
206-567-2345 |
5 |
Sears |
Miguel |
360-789-4567 |
6 |
Kyle |
Leah |
425-678-7654 |
7 |
Myers |
Lynda |
360-789-5678 |
ENROLLMENT
CustomerNumber | CourseNumber | AmountPaid | FullFeePaid |
1 |
1 |
$250.00 |
No |
1 |
3 |
$350.00 |
Yes |
2 |
2 |
$350.00 |
Yes |
3 |
1 |
$500.00 |
Yes |
4 |
1 |
$500.00 |
Yes |
5 |
2 |
$350.00 |
Yes |
6 |
5 |
$250.00 |
No |
7 |
4 |
$0.00 |
No |