This project demonstrates SQL querying skills using the Sakila sample database. It includes eight business-relevant questions designed to showcase capabilities in data extraction, aggregation, and insight generation.
All queries were written in MySQL Workbench and saved as .sql scripts. Screenshots of each query's results are included for visual verification.
sql-sakila-analysis/
└── sql-business-queries-sakila/
├── queries/ # SQL scripts for each business question
│ ├── top_rented_films.sql
│ ├── revenue_by_category.sql
│ ├── top_10_actors_by_film_count.sql
│ ├── top_cities_by_revenue.sql
│ ├── top_customers_by_rentals.sql
│ ├── top_customers_by_spending.sql
│ ├── cities_revenue_per_customer.sql
│ ├── top_staff_sales.sql
└── screenshots/ # Screenshots of query results
├── top_rented_films.png
├── revenue_by_category.png
├── top_10_actors_by_film_count.png
├── top_cities_by_revenue.png
├── top_customers_by_rentals.png
├── top_customers_by_spending.png
├── cities_revenue_per_customer.png
└── top_staff_sales.png
-
Top Rented Films
What are the most frequently rented movies?
Insight: These high-performing titles represent key inventory for customer engagement. Promoting them or bundling similar genres may increase rental volume. -
Revenue by Film Category
Which categories generated the most revenue?
Insight: Certain genres like Sports and Sci-Fi consistently generate higher revenue, indicating strong customer demand and guiding future stocking decisions. -
Top 10 Actors by Film Count
Which actors appeared in the largest number of films?
Insight: Actors with broad film coverage offer cross-selling opportunities across genres and can be featured in themed marketing campaigns. -
Top Cities by Total Revenue
Which customer cities brought in the highest total rental revenue?
Insight: Major cities dominate rental revenue, suggesting potential for targeted promotions, loyalty programs, or expansion of physical locations in those areas. -
Top Customers by Rental Volume
Who are the most active customers by number of rentals?
Insight: A small number of users drive a large share of rentals, reinforcing the value of retention strategies like tiered rewards or VIP service tiers. -
Top Customers by Total Spending
Which customers contributed the most revenue?
Insight: High-spending customers don’t always align with rental volume. Premium pricing or exclusive content may appeal to this segment. -
Cities with Highest Revenue per Customer
Where are customers most valuable on average?
Insight: Certain cities have fewer customers but higher revenue per user. These regions offer high-return marketing opportunities with less competition. -
Top Staff Member by Total Sales
Which employee generated the highest rental revenue?
Insight: Performance-based incentives or best practice sharing can be modeled around top staff members to boost overall sales performance.
- Writing complex SQL queries using
JOIN,GROUP BY,ORDER BY,LIMIT, andROUND - Business logic translation to SQL syntax
- Query documentation and versioning
- Visualization of query results for storytelling
- MySQL Workbench – SQL query development and database interaction
- Sakila Sample Database – Standard relational database used in tutorials and benchmarks
- GitHub – Version control and project publication
- Clone or download this repository.
- Open the
.sqlfiles in MySQL Workbench. - Make sure the Sakila schema is loaded.
- Execute queries and compare your output with the screenshots for reference.
This project is part of a structured portfolio roadmap to prepare for a data analyst role. It demonstrates core competencies in SQL and the ability to generate actionable business insights from relational databases.