Instruction
- Write a query to return the titles of movies with more than
>7 dvd copies in the inventory.
- The film titles are unique, i.e., no 2 films share the same titles.
Table 1:
film
| film_id |
title |
description |
release_year |
language_id |
original_language_id |
rental_duration |
rental_rate |
length |
replacement_cost |
rating |
last_update |
| 1 |
ACADEMY DINOSAUR |
A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teacher in The Canadian Rockies |
2006 |
1 |
NULL |
6 |
0.99 |
86 |
20.99 |
PG |
2017-09-10 17:46:03.905795-07 |
| 2 |
ACE GOLDFINGER |
A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China |
2006 |
1 |
NULL |
3 |
4.99 |
48 |
12.99 |
G |
2017-09-10 17:46:03.905795-07 |
col_name | col_type
----------------------+--------------------------
film_id | integer
title | text
description | text
release_year | integer
language_id | smallint
original_language_id | smallint
rental_duration | smallint
rental_rate | numeric
length | smallint
replacement_cost | numeric
rating | text
Table 2:
inventory
| inventory_id |
film_id |
store_id |
last_update |
| 1 |
1 |
1 |
2017-02-15 10:09:17-08 |
| 2 |
1 |
1 |
2017-02-15 10:09:17-08 |
| 3 |
1 |
1 |
2017-02-15 10:09:17-08 |
| 4 |
1 |
1 |
2017-02-15 10:09:17-08 |
| 5 |
1 |
2 |
2017-02-15 10:09:17-08 |
Each row is unique, inventoy_id is the primary key of this table.
col_name | col_type
--------------+--------------------------
inventory_id | integer
film_id | smallint
store_id | smallint
Sample results
title
------------------------
ACADEMY DINOSAUR
APACHE DIVINE