This repo contains my own SQL solutions for Case Study #1 (Danny's Diner),part of the 8 Week SQL Challenge created by Danny Ma.The full problem statement,dataset and questions can be found on the official website.
Danny loves Japanese food, so in early 2021 he opened a small restaurant selling his 3 favourite foods:sushi,curry and ramen.He wants to use the restaurant's basic customer data to answer a few simple questions about visiting patterns, spending, and favourite menu items-insights that will help him decide whether to expand the customer loyalty program.
Three tables are used:
- sales β customer purchase dates and which products were ordered
- menu β product names and prices
- members β customer loyalty program join dates
- JOIN (INNER JOIN)
- GROUP BY, aggregate functions (SUM, COUNT)
- Window Functions (ROW_NUMBER, RANK)
- Subqueries / CTEs
- CASE WHEN