Netflix Content Analytics ๐ฌ
Analyze movies and TV shows to uncover trends in content production, genres, ratings, countries, and audience preferences using SQL.
๐ฏ Business Objectives
โ Analyze the Netflix content library
โ Compare Movies vs TV Shows
โ Identify popular genres
โ Analyze content ratings
โ Track yearly content additions
โ Discover country-wise content trends
โ Measure content duration
โ Generate executive dashboards
๐ Step 1: Create Database
CREATE DATABASE netflix_db;
USE netflix_db;
๐ Step 2: Create Content Table
CREATE TABLE netflix_content (
show_id VARCHAR(20) PRIMARY KEY,
title VARCHAR(255),
content_type VARCHAR(20),
director VARCHAR(255),
country VARCHAR(100),
release_year INT,
date_added DATE,
rating VARCHAR(20),
duration VARCHAR(30),
genre VARCHAR(100)
);
๐ Step 3: Insert Sample Data
INSERT INTO netflix_content VALUES
('S1','Stranger Things','TV Show','The Duffer Brothers','United States',2016,'2022-01-10','TV-14','4 Seasons','Drama'),
('S2','Money Heist','TV Show','รlex Pina','Spain',2017,'2022-02-15','TV-MA','5 Seasons','Crime'),
('S3','Extraction','Movie','Sam Hargrave','United States',2020,'2022-03-01','R','116 min','Action'),
('S4','The Crown','TV Show','Peter Morgan','United Kingdom',2016,'2022-04-18','TV-MA','6 Seasons','Drama'),
('S5','Leo','Movie','Lokesh Kanagaraj','India',2023,'2024-01-20','UA','164 min','Action');
๐ง SQL Concepts You'll Practice
โ DDL and DML
โ Filtering and Sorting
โ Aggregate Functions
โ GROUP BY
โ HAVING
โ CASE WHEN
โ Date Functions
โ Window Functions
โ CTEs
โ Ranking Functions
๐ Business KPIs You Can Build
๐ Total Titles
๐ Movies vs TV Shows
๐ Content Added by Year
๐ Content Added by Month
๐ Content by Country
๐ Top 10 Producing Countries
๐ Genre Distribution
๐ Most Popular Ratings
๐ Content by Release Year
๐ Oldest and Newest Titles
๐ Average Movie Duration
๐ Longest Movie
๐ TV Shows by Number of Seasons
๐ Top Directors by Number of Titles
๐ Content Growth Trend
๐ Rating-wise Distribution
๐ Action vs Drama vs Comedy Analysis
๐ Percentage of Movies vs TV Shows
๐ Country-wise Content Contribution
๐ Executive Content Dashboard
๐ฏ This project reflects the type of SQL analysis performed by media companies, streaming platforms, entertainment analysts, and business intelligence teams to understand content strategy and audience trends.
๐ก Double Tap โค๏ธ For More