Question: The following questions will help you to practice writing SQL statements. The questions are based on the sakila database schema on MySQL Workbench. 1. Write
The following questions will help you to practice writing SQL statements. The questions are based on the "sakila" database schema on MySQL Workbench.
1. Write the sql statement that will provide you a list of actors with first name "Sandra" and also other records with last name "Bullock". How many rows were found?
2. Write the sql statement that will provide you a list of films acted by the first name "Sandra" and last name "Bullock" combination without showing duplicates.
3. You suspect that the names were mixed up at some point, and you know that "Sandra Bullock" only acts in documentaries, therefore. Write the sql statement that will provide you a list of documentary films that you suspect Sandra Bullock was the actor. (That either had first name "Sandra" or last name "Bullock".) How many rows were found?
4. Write the sql statement that will UPDATE the first name of only those films to Sandra. (Wrap your UPDATE around a START TRANSACTION and ROLLBACK)
5. Write the sql statement that will UPDATE the last name of only those films to Bullock. (Wrap your UPDATE around a START TRANSACTION and ROLLBACK)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
