Skip to content

lch129444/Explore_a_Relational_Database_PostgreSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Date created

2020-07-27

Project Title

Investigate a Relational Database

Description

This project uses PostgreSQL to query the Sakila DVD Rental database. The Sakila DVD Rental database holds information about a company that rents movie DVDs. The queries will gain an understanding of the customer base, such as what the patterns in movie watching are across different customer groups, how they compare on payment earnings, and how the stores compare in their performance.

Queries

1. Quartiles of the Rental-duration for Family-friendly Movies

  • Provide a table with the movie titles and divide them into 4 levels (first_quarter, second_quarter, third_quarter, and final_quarter) based on the quartiles (25%, 50%, 75%) of the rental duration for movies across all categories

2. Two Stores Compare in Rental Orders

  • Find out how the two stores compare in their count of rental orders during every month for all the years we have data for

3. Top 10 Paying Customers’ Monthly Payment

  • Write a query to capture the customer name, month and year of payment, and total payment amount for each month by these top 10 paying customers

4. Top 10 paying Customers’ Monthly Payment Differences

  • For each of these top 10 paying customers, find out the difference across their monthly payments during 2007

Files used

In this project, I used data provided by PostgreSQL.

Software used

  • PostgreSQL
  • PGAdmin
  • Atom
  • Terminal on Mac

Credits

About

A real-world case practicing SQL for data cleansing and EDA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages