I have a sql statement to find the actors that have acted in the documentary film with the highest rental rate from the given schema:
film: film_id, rental_rate,
film_actor: actor_id, film_id
film_category: film_id, category_id
category: category_id, name
SELECT *
FROM actor
WHERE actor_id IN
(SELECT actor_id
FROM film_actor
WHERE film_actor.actor_id = actor.actor_id
AND film_id IN
(SELECT film.film_id
FROM film, film_category, category
WHERE category.name = 'Documentary'
AND film.film_id = film_category.film_id
AND film_category.category_id = category.category_id
AND rental_rate = (SELECT MAX(rental_rate)
FROM film, category, film_category
WHERE category.name = 'Documentary'
AND film.film_id = film_category.film_id
AND film_category.category_id = category.category_id)));
A question I've been asked to explain is whether it is possible to write a SQL statement to create an Oracle trigger that increases the rental_rate by 10% for any future films starring any of the actors that I found in the sql statement I've written. I can't really think of a reason why I couldn't - unless I have missed something but would like a second opinion about this, and how I could do it if possible