GithubHelp home page GithubHelp logo

armandolazalde / danny-s-dinner Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

A business owner wants to use his restaurant data to answer some simple questions about his customers, especially about their visiting patterns, how much money they have spent and also which menu items are their favorites.

data-analysis data-analytics project sql sql-server

danny-s-dinner's Introduction

Danny's Diner: the customer's vision uncovered

๐Ÿ“„ Context

Danny seriously loves Japanese food so in the beginning of 2021, he decides to embark upon a risky venture and opens up a cute little restaurant that sells his 3 favourite foods: sushi, curry and ramen.

Dannyโ€™s Diner is in need for data analyst assistance to help the restaurant stay afloat - the restaurant has captured some very basic data from their few months of operation but have no idea how to use their data to help them run the business.

๐Ÿ’ผ Business problem

He 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.

These insights will help him to decide whether he should expand the existing customer loyalty program - additionally he needs help to generate some basic datasets so his team can easily inspect the data without needing to use SQL.

Has provided us with a sample of his overall customer data due to privacy issues. We have 3 key datasets for this case study:

  1. Sales โ€“ this dataset holds valuable information about the transactions that take place at Dannyโ€™s Diner, including the customer ID, menu items ordered and the order date.
  2. Menu โ€“ It encompasses all the delightful culinary creations offered at the restaurant including curry, ramen and sushi. It contains details such as item names, and their prices.
  3. Members โ€“ This dataset holds information about when customers joined the beta version of Dannyโ€™s loyalty program.

Entity Relationship Diagram

image

๐Ÿ“ Requirements

Each of the following case study questions can be answered using a single SQL statement:

  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 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?
  11. Create basic data tables that Danny and his team can use to quickly derive insights without needing to join the underlying tables using SQL.
  12. Danny also requires further information about the ranking of customer products, but he purposely does not need the ranking for non-member purchases so he expects null ranking values for the records when customers are not yet part of the loyalty program.

๐Ÿ’ก Sample solution to some requirements with SQL queries

image

image

image

๐Ÿ“Š Results examples

image

image

image

This project is part of Danny Ma's 8WeekSQLChallenge, and was made possible through his guidance. Visit his website for more case studies and SQL for data analysis projects, DataWithDanny

danny-s-dinner's People

Contributors

armandolazalde avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.