Question: Write a SQL statement to find the Comedy films with the longest running time. Your query should output the names and lengths of the films.

Write a SQL statement to find the Comedy films with the longest running time. Your query should output the names and lengths of the films.

CREATE TABLE category ( category_id NUMBER(3) NOT NULL, name varchar2(25) );

CREATE TABLE film ( film_id NUMBER(5) NOT NULL, title varchar2(255), description varchar2(255), release_year NUMBER(4) DEFAULT NULL, language_id NUMBER(3) NOT NULL, original_language_id NUMBER(3) DEFAULT NULL, rental_duration NUMBER(3) DEFAULT 3 NOT NULL, rental_rate NUMBER(4,2) DEFAULT '4.99', length NUMBER(5) DEFAULT NULL, replacement_cost NUMBER(5,2) DEFAULT '19.99' NOT NULL, rating varchar2(8) DEFAULT 'G', special_features varchar2(255) DEFAULT NULL );

CREATE TABLE film_category ( film_id NUMBER(5) NOT NULL, category_id NUMBER(3) NOT NULL );

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!