movie data
This tutorial introduces the notion of a join. The database consists of three tablesmovie,actorandcasting.
movie:
id
title
yr
director
budget
gross
actor:
id
casting:
movieid
actorid
ord
1. 1962 movies
List the films where the yr is 1962 [Show id, title]
SELECT id, title
FROM movie
WHERE yr=1962;2. When was Citizen Kane released?
Give year of 'Citizen Kane'.
SELECT yr
FROM movie
WHERE title = 'Citizen Kane';3. Star Trek movies
List all of the Star Trek movies, include the id, title and yr (all of these movies include the words Star Trek in the title). Order results by year.
4. id for actor Glenn Close
What id number does the actor 'Glenn Close' have?
5. id for Casablanca
What is the id of the film 'Casablanca'
6. Cast list for Casablanca
Obtain the cast list for 'Casablanca'.
Use movieid=11768, (or whatever value you got from the previous question)
7. Alien cast list
Obtain the cast list for the film 'Alien'
8. Harrison Ford movies
List the films in which 'Harrison Ford' has appeared
9. Harrison Ford as a supporting actor
List the films where 'Harrison Ford' has appeared - but not in the starring role. [Note: the ord field of casting gives the position of the actor. If ord=1 then this actor is in the starring role]
10. Lead actors in 1962 movies
List the films together with the leading star for all 1962 films.
11. Busy years for John Travolta
Which were the busiest years for 'John Travolta', show the year and the number of movies he made each year for any year in which he made more than 2 movies.
12. Lead actor in Julie Andrews movies
List the film title and the leading actor for all of the films 'Julie Andrews' played in.
13. Actors with 30 leading roles
Obtain a list, in alphabetical order, of actors who've had at least 30 starring roles.
14.
List the films released in the year 1978 ordered by the number of actors in the cast, then by title.
15.
List all the people who have worked with 'Art Garfunkel'.
Last updated
Was this helpful?
