We assume you have already completed the tutorial on a separate page.
Please use SQL to solve each of the following exercises.
In Moodle, please submit three files: exercise1a.sql, exercise1b.sql, and exercise1c.sql. If you haven't completed all parts, you can submit blank files. However, we recommend developing and debugging on your own machine before going to Moodle.
Some writers died before their associated movies were made. Write a query that returns records with columns name, gap where name is the name of a deceased writer that was credited with a movie made in a year after their deathYear. The gap is the difference between the movie's year and the writer's deathYear.
Write a query that returns columns name, role, movie_count where the actor with name has played role in movie_count number of regular movies (not a TV Movie).
Write a query that returns records with columns role, name, movie_title, tv_movie_title where name is the name of a person that has the same role in both the movie of title movie_title and the TV movie with title tv_movie_title.