This SQL project includes data analysis queries of an online movie rental shop called Green Cycles.
This repository contains SQL projects that analyze various aspects of customer behavior, movie details, and revenue for an online movie rental shop called Green Cycles. The queries cover a range of SQL concepts including JOINs, subqueries, CASE statements, and more.
This query calculates the average customer lifetime value using subqueries to aggregate rental and payment data.
This query demonstrates how to use JOIN and GROUP BY to categorize movies based on their genres and calculate related statistics.
This query finds the lengths of movies alongside their replacement costs using a correlated subquery to get precise cost details for each movie.
A simple query to retrieve the longest movie available in the database, using an INNER JOIN to combine related tables.
This query categorizes movies into different ranges of replacement costs using the CASE-WHEN statement.
Analyzes the revenue generated per customer and staff by using uncorrelated subqueries to fetch total revenue data.
This query identifies records with missing address information using a combination of LEFT JOIN, filtering, and aggregating results with CASE-WHEN and SUM.
The data used for these queries is based on the Pagila sample database, a PostgreSQL sample schema designed for a DVD rental store.