This repository contains my solutions and case study write-ups for Danny Ma's 8 Week SQL Challenge. I am using PostgreSQL to solve complex, real-world business problems ranging from transactional data cleaning to advanced customer analytics and subscription metrics.
- Case Study #1: Danny's Diner
- Case Study #2: Pizza Runner
- Case Study #3: Foodie-Fi
- Case Study #4: Data Bank
- Case Study #5: Data Mart
- Case Study #6: Clique Bait
- Case Study #7: Balanced Tree Clothing Co
- Case Study #8: Fresh Segments
- Database: PostgreSQL
- Tools: DBeaver / Notepad++
- Key SQL Concepts Applied:
- Common Table Expressions (CTEs)
- Window Functions (
RANK(),DENSE_RANK(),ROW_NUMBER(),LEAD(),LAG()) - Data Cleansing & Type Casting (
NULLIF,CASE WHEN,CAST) - Complex Joins & Subqueries
- Clone this repository to your local machine:
git clone https://github.com/jbonells/sql-8-week-challenge.git - Open your preferred PostgreSQL client (e.g., pgAdmin or DBeaver).
- Navigate to the specific case study folder (e.g.,
Case Study #1 - Danny's Diner/) and execute theschema.sqlfile to set up the database and tables. - Run the queries in
solutions.sqlto explore the data and review the findings. - Check
insights.mdto understand my solutions.