-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex1.sql
More file actions
44 lines (40 loc) · 1.24 KB
/
ex1.sql
File metadata and controls
44 lines (40 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- Displaying films that is offered by Hulu, Prime, and Disney+
SELECT filmTitle
FROM streamingPlat
WHERE filmHulu = 1
and filmPrime = 1
and filmDisney = 1;
--Display TV Shows that stared and ended in the year 2021
SELECT tvTitle
FROM tvDetails
WHERE showStatus = 'Ended'
AND airDate like '2021-%'
AND lastDate like '2021-%';
-- Retrieve ratings, genre, and summary from Owned Films along with the film name
SELECT filmName, rating, genre, summary
FROM OwnedFilms, movieDetails
WHERE filmName = movieTitle;
--Searching up all film details available from a specified movie in the watch later list
SELECT *
FROM movieDetails
WHERE movieTitle = (SELECT filmName
FROM WatchLater
WHERE filmName = 'Avatar');
-- Display Movies That are only on Hulu
SELECT filmTitle
FROM streamingPlat
WHERE filmType = 0
AND filmHulu = 1
AND filmDisney = 0
AND filmPrime= 0
AND filmNetflix = 0;
---- Display TvShows That are only on Hulu and Prime along with their genre
SELECT filmTitle, genre
FROM streamingPlat, tvDetails
WHERE filmType = 1
AND filmHulu = 1
AND filmDisney = 0
AND filmPrime= 1
AND filmNetflix = 0
AND tvTitle = filmTitle;
----