Question:
Write a query to display the movie number, movie genre, average movie cost of movies in that genre, movie cost of that individual movie, and the percentage difference between the average movie cost and the individual movie cost (result shown in Figure). The percentage difference is calculated as the cost of the individual movie minus the average cost of movies in that genre, divided by the average cost of movies in that genre multiplied by 100. For example, if the average cost of movies in the Family genre is $25, if a given Family movie cost $26, then the calculation would be ((26 25) / 25 * 100), which would work out to be 4.00%. This indicates that this movie costs 4% more than the average Familymovie.
Transcribed Image Text:
Movie Num Movie Genre Average Cost Movie Cost Percent Difference 1234 FAMILY 1235 ACTION 1236 DRAMA 1237 COMEDY 1238 DRAMA 1239 DRAMA 1245 ACTION 1246 COMEDY 39.95 52.7259.95 58.46 44.12 58.46 58.46 52.72 45.49 4.1258.29 0.00 13.71 2.54 -32.12 53.86 56.40 13.71 32 12 39.95 59.95 29.95 89.95 25.49