Construct an SQL script that contains the definitions of the following views. 1. Create a view called
Question:
Construct an SQL script that contains the definitions of the following views.
1. Create a view called 'movie_summary' which returns the movie_title, release_date, media_type and retail_price for all movies in the database. This will contain some duplicates for media_type.
2. create a view called 'old_shipments' that lists the customer first_name and last_name, movie_id, shipment_id and shipment_date for every shipment before 2010.
3. create a view called 'trilogy' that Returns a list of the titles of all movies with the words 'Rings' or 'Wars' in the title.
4. create a view called 'retail_price_hike' that returns the movie_id , retail_price and a final column that contains the retail price increased by 25%.
5. create a view called 'value_summary' that returns the total cost value (cost*stock) and total retail value (retail*stock) across all stock.
6. create a view called 'profits_from_movie' that returns the movie_id and movie_title for each movie along with the difference between the sum of the cost and retail values across all shipments for each movie. The results should be grouped by movie_title.
7. create a view called 'followers_of_melkor' that returns the first name, last name of any customer who has not purchased any media_type of the movie named 'The Lord of the Rings: The Fellowship of the Ring'.
8. create a view called 'sole_angry_watcher' that returns the first_name and last_name of any customer (If one exists) who is the only customer to buy '12 Angry Men' (Note the customer may buy other movies as well, but if anyone else buys the movie, no records should be returned).