Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TABLE Film ( FNr INTEGER NOT NULL, Title VARCHAR(100), Year SMALLINT, Country VARCHAR(50), Genre VARCHAR(50), age SMALLINT, Time SMALLINT, Price DECIMAL(8, 2), CONSTRAINT FilmPN

CREATE TABLE Film ( FNr INTEGER NOT NULL, Title VARCHAR(100), Year SMALLINT, Country VARCHAR(50), Genre VARCHAR(50), age SMALLINT, Time SMALLINT, Price DECIMAL(8, 2), CONSTRAINT FilmPN PRIMARY KEY (FNr) );

INSERT INTO Film (FNr, Title, year, country, Genre, Age, Time, Price) VALUES ( 1, 'Casablanca', 1942, 'USA', 'Drama', 15, 102, '149.00'), ( 2, 'Fort Apachea', 1948, 'USA', 'Western', 15, 127, NULL), ( 3, 'Apocalypse Now', 1979, 'USA', 'Action', 18, 155, '123.00'), ( 4, 'Streets of Fire', 1984, 'USA', 'Action', 15, 93, NULL), ( 5, 'High Noon', 1952, 'USA', 'Western', 15, 85, '123.00'), ( 6, 'Cinema Paradiso', 1988, 'Italia', 'Komedie', 11, 123, NULL), ( 7, 'Asterix hos britene', 1988, 'Frankrike', 'Tegnefilm', 7, 78, '149.00'), ( 8, 'Veiviseren', 1987, 'Norge', 'Action', 15, 96, '87.00'), ( 9, 'Salmer fra kjkkenet', 2002, 'Norge', 'Komedie', 7, 80, '149.00'), (10, 'Anastasia', 1997, 'USA', 'Tegnefilm', 7, 94, '123.00'), (11, 'La Grande bouffe', 1973, 'Frankrike', 'Drama', 15, 129, ' 87.00'), (12, 'The Blues Brothers', 1980, 'USA', 'Komedie', 11, 124, '135.00'), (13, 'Beatles: Help', 1965, 'Storbritania', 'Musikk', 11, 144, NULL);

download this file and run it in Worbench.

Then perform the following queries against this file:

Shortest and longest playing time within each genre. Number of movies that are not for sale. Number of films where price is under 100. Average price for genres with more than 2 films. The difference between the most expensive and cheapest movie within each genre. Total number of films and number of films for sale, by country of production. Number of years since release for films older than 60 years.

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

1. What is Ebola ? 2.Heart is a muscle? 3. Artificial lighting?

Answered: 1 week ago