Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQL Query based on RELMDB 1.For each genre display the total number of films, average fan rating, and average USA gross. A genre should

Write SQL Query based on RELMDB

1.For each genre display the total number of films, average fan rating, and average USA gross. A genre should only be shown if it has at least five films. Any film without a USA gross should be excluded. A film should be included regardless of whether any fans have rated the film. Show the results by genre. (Hint: use the TRIM function to only show a single record from the same genre.)

2.We believe there may be erroneous data in the movie database. To help uncover unusual records for manual review, write a query that finds all actors/actresses with a career spanning 60 years or more. Display each actor's name, how many films they worked on, the year of the earliest and latest film they worked on, and the number of years the actor was active in the film industry (assume all years between the first and last film were active years). Display actors with the longest career first.

3.The movies database has two tables that contain data on fans (FANS_OLD and FANS). Due to a bug in our application, fans may have been entered into the old fans table rather then the new table. Find all fans that exist in the old fans table but not the new table. Use only the first and last name when comparing fans between the two tables.

4.For each movie display its movie title, year, andhow many cast members were a part of the movie. Exclude movies with five or fewer cast members. Display movies with the most cast members first, followed by movie year and title.image text in transcribed

RELMDB Schema (Movie Database) Locales PK a ID oty oity Zip Birthdae Cacts PK Writer Document Cast Role PKEinup Fan RatinEs Film Tite Film Year FK1 MPAA Rating Rele ase Dste Runtim e Budeet Werldwide Gross USA Gross Gross Date AFI Rank MOb Rank MOb Rating MOb Votes Tagline MOb Rating First Rate d Lact Rate d Genre PK Direster Tagllines Keyword:s PK Iacline MPAA Rtings Ratirg Description

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

Write down the circumstances in which you led.

Answered: 1 week ago