Question: 4 . 7 LAB - Nested aggregates ( Sakila ) Refer to the film and inventory tables of the Sakila database. The tables in this

4.7 LAB - Nested aggregates (Sakila)
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.
Write a query that lists the titles of films with the fewest rows in the inventory table.
This query requires a subquery that computes the minimum of counts by film_id:
SELECT MIN (count_film_id)
FROM ( SELECT COUNT(film_id) AS count_film_id
FROM inventory
GROUP BY film_id )
As temp_table;
This subquery is provided in the template.
5451404053812 qx3zqy 7
LAB
4.7.1: LAB - Nested aggregates (Sakila)
Main.sql
Load default template...
11234
( SELECT MIN(count_film_id) FROM
( SELECT COUNT (film_id) AS count_film_id
FROM inventory
GROUP BY film_id )
AS temp_table );
 4.7 LAB - Nested aggregates (Sakila) Refer to the film and

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!