|
@@ -15,4 +15,17 @@ SELECT * FROM MOVIES WHERE GENRE='Sci-Fi';
|
15
|
15
|
SELECT * FROM MOVIES WHERE IMDB_SCORE >= 6.5;
|
16
|
16
|
|
17
|
17
|
SELECT * FROM MOVIES WHERE
|
18
|
|
-RUNTIME < 100 AND RATING = 'G' OR RATING = 'PG';
|
|
18
|
+RUNTIME < 100 AND RATING = 'G' OR RATING = 'PG';
|
|
19
|
+
|
|
20
|
+SELECT GENRE, AVG(RUNTIME)
|
|
21
|
+FROM MOVIES WHERE IMDB_SCORE < 7.5 GROUP BY GENRE;
|
|
22
|
+
|
|
23
|
+UPDATE MOVIES SET RATING = 'R' WHERE TITLE = 'Starship Troopers';
|
|
24
|
+
|
|
25
|
+SELECT TITLE, ID, RATING FROM MOVIES WHERE GENRE = 'Horror' OR GENRE = 'Documentary';
|
|
26
|
+
|
|
27
|
+SELECT RATING, AVG(IMDB_SCORE), MIN(IMDB_SCORE), MAX(IMDB_SCORE) FROM MOVIES GROUP BY RATING ;
|
|
28
|
+
|
|
29
|
+SELECT RATING, AVG(IMDB_SCORE), MIN(IMDB_SCORE), MAX(IMDB_SCORE) FROM MOVIES GROUP BY RATING HAVING COUNT(*) > 1;
|
|
30
|
+
|
|
31
|
+DELETE FROM MOVIES WHERE RATING = 'R';
|