load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/netflix_users.csv'
into table netflix.users
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
ignore 1 rows;- Users (User_ID, Name, Age, Country, Subscription_Type)
- Watch_History (User_ID, Watch_Time_Hours, Favorite_Genre, Last_Login)
- Churn_Analysis (User_ID, Predicted_Churn, LastUpdated)
- Retrieve the total number of users in the dataset.
- Find the average age of users for each subscription type.
- List the number of users per country.
- Determine the most popular subscription type based on user count.
- Find the total watch time for each subscription type.
- Calculate the average watch time per user.
- Identify the top 5 users who have watched the most hours.
- Get the count of users who have logged in within the last 30 days.
- Find the percentage of users subscribed to each subscription type.
- Retrieve the most common favorite genre among all users.
- Identify the least common favorite genre.
- List the number of users for each age group (e.g., 13-18, 19-25, 26-35, etc.).
- Find users who have watched more than 100 hours in the last month.
- Get the country with the highest total watch time.
- Determine the average watch time per user per country.
- Country = France | USA | India | Canada | Mexico | Japan | Australia | Germany | Brazil | UK
- Total_users
- Average_watch_time
- Favorite_genre
- Subscription_type
- Churn_rate
- Speed up large dataset operations.
- Indexed the country column making any country based querying faster!



