Question: 4 . 1 1 LAB - Nested aggregates ( Sakila ) LAB ACTIVITY 4 . 1 1 . 1 : LAB - Nested aggregates (
LAB Nested aggregates Sakila
LAB
ACTIVITY
: 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. 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 filmid: Run
History
Tutorial
Initialize.sql
Main.sql
Use the following subquery:
SELECT MINcountfilmid FROM
SELECT COUNTfilmid AS countfilmid
FROM inventory
GROUP BY filmid
AS temptable ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
