In questions 1-6 you will need to write SQL queries over the IMDB database schema:
actor (id, fname, lname, gender) movie (id, name, year) directors (id, fname, lname) casts (pid, mid, role) movie_directors (did, mid) genre (mid, genre)
The above schema has the following constraints:
- actor.id, movie.id, and director.id are primary keys for the corresponding tables
- casts.pid is a foreign key to actor.id
- casts.mid is a foreign key to movie.id
- movie_directors.did is a foreign key to directors.id
- movie_directors.mid is a foreign key to movie.id
- genre.mid is a foreign key to movie.id
5. Q5: Return the maximum number of thrillers that any director has directed. The output of your query should be a number. Submit the query in file Q5.sql.
6. Q6: We want to find actors who played exactly five distinct roles in the same movie during the year 1990. Write a query that returns the actors' first name, last name, and movie name. Example of the query output below. Submit the query in file Q6.sql.