Question: 4 . 1 1 LAB - Nested aggregates ( Sakila ) LAB ACTIVITY 4 . 1 1 . 1 : LAB - Nested aggregates (

4.11 LAB - Nested aggregates (Sakila)
LAB
ACTIVITY
4.11.1: LAB - Nested aggregates (Sakila)
010
Refer to the film and inventory tables of the Sakila database. The tables in this lab have the same columns and data types but fewer rows. The tables are initialized with LOAD rather than INSERT statements. The LOAD statements read data from . csv files. In these files, \N represents NULL.
Write a statement that selects the titles of films with the fewest rows in the inventory table.
This statement requires a subquery that computes the minimum of counts by film_id: Run
(3) History
Tutorial
(34)
Initialize.sql
Main.sql
21
22-- Use the following subquery:
23
( SELECT MIN(count_film_id) FROM
24( SELECT COUNT(film_id) AS count_film_id
25 FROM inventory
26 GROUP BY film_id )
27
AS temp_table );
4 . 1 1 LAB - Nested aggregates ( Sakila ) LAB

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 Programming Questions!