|
|
|
|
4
|
|
4
|
|
5
|
The following lab is to be completed using the H2 Console. Once you have figured out the correct queries for each step, save a copy in a file called `src/main/resources/script.sql`. This will be how you submit this assignment. If at any time you need to reset the database, you can restart your Spring Boot server.
|
5
|
The following lab is to be completed using the H2 Console. Once you have figured out the correct queries for each step, save a copy in a file called `src/main/resources/script.sql`. This will be how you submit this assignment. If at any time you need to reset the database, you can restart your Spring Boot server.
|
6
|
|
6
|
|
7
|
-### Campy movie database
|
|
|
|
|
7
|
+### Mini Movie Database
|
8
|
|
8
|
|
9
|
Add the following movies to the `movies` table using an insert statement:
|
9
|
Add the following movies to the `movies` table using an insert statement:
|
10
|
|
10
|
|
|
|
|
|
29
|
|
29
|
|
30
|
There's been a data entry mistake; Starship Troopers is actually rated R, not PG-13. Create a query that finds the movie by its title and changes its rating to R.
|
30
|
There's been a data entry mistake; Starship Troopers is actually rated R, not PG-13. Create a query that finds the movie by its title and changes its rating to R.
|
31
|
|
31
|
|
|
|
32
|
+Show the ID number and rating of all of the Horror and Documentary movies in the database. Do this in only one query.
|
|
|
33
|
+
|
32
|
This time let's find the average, maximum, and minimum IMDB score for movies of each rating.
|
34
|
This time let's find the average, maximum, and minimum IMDB score for movies of each rating.
|
33
|
|
35
|
|
34
|
That last query isn't very informative for ratings that only have 1 entry. use a `HAVING COUNT(*) > 1` clause to only show ratings with multiple movies showing.
|
36
|
That last query isn't very informative for ratings that only have 1 entry. use a `HAVING COUNT(*) > 1` clause to only show ratings with multiple movies showing.
|