Skip to content

Tungana-Bhavya/8-WEEK-SQL-CHALLENGE

Repository files navigation

8-WEEK-SQL-CHALLENGE

My solutions to the case study #1 Danny's Diner provided by the website https://8weeksqlchallenge.com/

🍜 Case Study #1: Danny's Diner

Image

Problem Statement

Danny wants to use the data to answer a few simple questions about his customers, especially about their visiting patterns, how much money they’ve spent and also which menu items are their favourite. Having this deeper connection with his customers will help him deliver a better and more personalised experience for his loyal customers.


Case-Study Questions

The below are the questions provided as a part of case study #1 Danny's Diner:

  1. What is the total amount each customer spent at the restaurant?
  2. How many days has each customer visited the restaurant?
  3. What was the first item from the menu purchased by each customer?
  4. What is the most purchased item on the menu and how many times was it purchased by all 6. customers?
  5. Which item was the most popular for each customer?
  6. Which item was purchased first by the customer after they became a member?
  7. Which item was purchased just before the customer became a member?
  8. What is the total items and amount spent for each member before they became a member?
  9. If each $1 spent equates to 10 points and sushi has a 2x points multiplier - how many points would each customer have?
  10. In the first week after a customer joins the program (including their join date) they earn 2x points on all items, not just sushi - how many points do customer A and B have at the end of January?

The below table consists of question id along with my answers and output links:

QID Answer Output
1 Solution Output
2 Solution Output
3 Solution Output
4 Solution Output
5 Solution Output
6a Solution Output
6b Solution Output
7a Solution Output
7b Solution Output
8 Solution Output
9 Solution Output
10 Solution Output