-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQL_Queries_and_Results.txt
More file actions
51 lines (45 loc) · 1.23 KB
/
SQL_Queries_and_Results.txt
File metadata and controls
51 lines (45 loc) · 1.23 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
45
46
47
48
49
50
51
SQL Queries and Results
1. Total Number of Shows:
SELECT COUNT(*) AS total_shows FROM netflix_titles;
Result: 8807
2. Average Duration of Movies:
SELECT AVG(CAST(REPLACE(duration, ' min', '') AS UNSIGNED)) AS avg_movie_duration
FROM netflix_titles
WHERE type = 'Movie';
Result: 99.58 minutes
Cool Facts
1. Total Number of TV Shows:
SELECT COUNT(*) AS total_tv_shows FROM netflix_titles WHERE type = 'TV Show';
Result: 2676
2. Most Common Rating:
SELECT rating, COUNT(*) AS count
FROM netflix_titles
GROUP BY rating
ORDER BY count DESC
LIMIT 1;
Result: TV-MA (3207 shows)
Ask Away
Question 1: What are the top 5 countries producing the most content on Netflix?
SELECT country, COUNT(*) AS total_content
FROM netflix_titles
GROUP BY country
ORDER BY total_content DESC
LIMIT 5;
Result:
- United States: 2818
- India: 972
- United Kingdom: 419
- Japan: 245
- South Korea: 199
Question 2: What are the top 5 genres with the most content on Netflix?
SELECT listed_in, COUNT(*) AS total_content
FROM netflix_titles
GROUP BY listed_in
ORDER BY total_content DESC
LIMIT 5;
Result:
- International Movies: 2752
- Dramas: 2427
- Comedies: 1674
- International TV Shows: 1351
- Documentaries: 869