Home  /  Questions  /  Question



0   0
Mar 24, 2017


SQL Basic Question- Multiple Tables Aggregate Function

Let me first start off by saying, this is NOT HOMEWORK. I genuinely need help. I apparently need to start off with this because we live in a filthy dishonest world where no one trusts each other.

Now on to the question:

Listing the movie titles and profit amounts for each showing. Each movie showing earns 15% profit from its ticket sales. Assume individual ticket price is $9.50.
Listing unrated movie titles that sold 15 or less tickets, but exclude the city of Orange.
Listing all rated R movie titles and total ticket sales for showings with ticket sales greater than 20.

MOVIES(MovieID, Title, Rating)
THEATERS(TheaterID, TheaterName, OwnerID, LocationID)
OWNERS(OwnerID, FName, LName)
LOCATION(LocationID, City, State)
TICKETS(TheaterID, MovieID, SalesDate, TicketsSold)


SQL