A290 SQL Programming: Assignment 4

A290 SQL Programming: Assignment 4

Assignments should be turned into oncourse as a .sql file. The name of the file should have the following format username_a4.sql. All queries should be written using tables from the Entertainment Agency example database from the book. If what should be returned for a query or conditions are unclear you should justify your query in comments. The standard header should be placed in comments at the top of the file and each query should be labeled with its number in comments. All queries should use grouping and/or aggregate functions.


1.     Rewrite the query from assignment 3 on finding the male and female members which worked for the highest contract price.

2.     Provide the total amount spent and the number of engagements associated with each customer.

3.     What is the start time which has the highest average contract price?

4.     What is the most popular musical preference?

5.     On average what city pays entertainers best?

6.     What agent has the most entertainers?

7.     If each member in an Entertainer gets an equal share of the contract, find the member who overall has made the most money.
Powered by