Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These questions involve two table SQL. The following two related tables contain data on Movies and the profile of their production companies. The first table

These questions involve two table SQL. The following two related tables contain data on Movies and the profile of their production companies.

The first table is called ProdCos

image text in transcribed

The second table is called Movies

image text in transcribed

Using the two tables above, answer the following questions using SQL. Remember, when FROM contains more than two tables, an alias must be used.

1. List the production company info for movies with a rating of 7.5 or greater.

2. List the production company info for the movie with highest opening weekend Gross /Bueget ratio.

3. For each movie, list the name, budget per minute of runtime, and its director.

Below is the code used to create both tables and insert their rows:

CREATE TABLE ProdCos (ProdID CHAR(2) PRIMARY KEY,

ProdName VARCHAR2(25),

Address VARCHAR(35),

ProdCity VARCHAR2(20),

ST CHAR(2),

ProdZIP CHAR(5),

ProdPhone CHAR(13));

INSERT INTO ProdCos VALUES('10' , 'Atlas Entertainment' , '9200 West Sunset Boulevard # 10' , 'West Hollywood', 'CA' , '90069' , '(310)786-4900');

INSERT INTO ProdCos VALUES('11' , 'Marvel Studios' , '500 South Buena Vista St' , 'Burbank' , 'CA' , '91521' , '(818)560-9100');

INSERT INTO ProdCos VALUES('12' , 'Walt Disney' , '350 South Buena Vista St' , 'Burbank' , 'CA' , '91521' , '(818)560-1000');

INSERT INTO ProdCos VALUES('13' , 'Paramount Pictures' , '5555 Melrose Avenue' , 'Los Angeles' , 'CA' , '90038' , '(323)956-8864');

INSERT INTO ProdCos VALUES('14' , 'Black Label Media' , '9301 Wilshire Boulevard 604' , 'Beverly Hills' , 'CA' , '90210' , '(505)273-5781');

INSERT INTO ProdCos VALUES('15' , 'Warner Bros' , '4000 Warner Boulevard' , 'Burbank' , 'CA' , '91522' , '(818)954-6000');

INSERT INTO ProdCos VALUES('16' , 'Universal Pictures' , '100 Universal City Plaza' , 'Universal City' , 'CA' , '91608' , '(818)777-1000');

INSERT INTO ProdCos VALUES('17' , 'Hurwitz Creative' , '5344 Vineland Avenue' , 'North Hollywood' , 'CA' , '91601' , '(818)487-8300');

CREATE TABLE Movies (MovID CHAR(3) PRIMARY KEY,

MovTitle VARCHAR2(50),

Genre VARCHAR2(15),

ReleaseDate Date,

DirLName VARCHAR2(15),

DirFName VARCHAR2(15),

Rating NUMBER(3,1),

Budget NUMBER(11),

OpWkEnd NUMBER(11),

RunTime NUMBER(3),

ProdID CHAR(2) REFERENCES ProdCos (ProdID));

INSERT INTO movies VALUES('110' , 'Wonder Woman', 'Action' , '02-JUN-17' , 'Jenkins' , 'Patty' , 8.3, 149000000, 103251471, 141,'10');

INSERT INTO movies VALUES('111' , 'Guardians of the Galaxy' , 'Action' , '05-MAY-17' , 'Gunn' , 'James', 8.1, 200000000, 146510104, 136, '11');

INSERT INTO movies VALUES('112' , 'Pirates of the Caribbean: Dead Men Tell No Tales' , ' Action' , '26-MAY-17' , 'Rnning' , 'Joachim' , 7.1, 230000000, 62179000, 129, '12');

INSERT INTO movies VALUES('113' , 'Bay Watch' , 'Action' , '25-MAY-17' , 'Gordon ' , 'Seth' , 5.7, 69000000, 18100000, 116, '13');

INSERT INTO movies VALUES('114' , 'La La Land' , 'Romance' , '25-DEC-16' , 'Chazelle' , 'Damien' , 8.3 , 30000000 , 4102091, 128, '14');

INSERT INTO movies VALUES('115' , 'Moana' , 'Animation' , '23-NOV-16' , 'Clements', 'Ron' , 7.7, 150000000, 56631401, 107, '12');

INSERT INTO movies VALUES('116' , 'Batman v Superman: Dawn of Justice' , 'Action' , '25-Mar-16' , 'Snyder' , 'Zack' , 6.7 , 250000000, 166007347, 151, '15');

INSERT INTO movies VALUES('117' , 'The Secret Life of Pets' , 'Animation' , '08-JUL-16' , 'Renaud' , 'Chris' , 6.6, 75000000, 104352905,87, '16');

INSERT INTO movies VALUES('118' , 'Finding Dory' , 'Animation' , '17-JUN-16' , 'Stanton' , 'Andrew', 7.4, 200000000, 135000000,97,'17');

ProdCity Prodi ProdName ProdAddress ST Prod ZIP Prod Phone Atlas Entertainment 9200 West Sunset Boulevard 10 West Hollywood CA 90069 (310 786-4900 10 Marvel Studios 500 South Buena Vista St Burbank CA 91521 (818) 560-9100 11 CA 91521 (818 560-1000 350 South Buena Vista St 12 Walt Disney Burbank CA 90038 (323) 956-8864 Los Angeles 5555 Melrose Avenue 13 Paramount Pictures Black Label Media 9301 Wilshire Boulevard 604 14 Beverly Hills CA 90210 (505) 273-5781 CA 91522 (818 954-6000 4000 Warner Boulevard 15 Warner Bros Burbank CA 91608 (818 777-1000 Universal Pictures 100 Universal City Plaza 16 Universal City 5344 Vineland Avenue 17 North Hollywood CA 91601 (818) 487-8300 Hurwitz Creative

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

Determine the value of T (G) when G is a complete graph.

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago