Skip to content

In this case study, I have used different concepts of intermediate and Advanced SQL like CTE's, Window Functions, Nested Subqueries and Joins to gain relevant insights from the data.

Notifications You must be signed in to change notification settings

Gaurav1401/Swiggy_Case_Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Swiggy_Case_Study

In this case study, I have used different concepts of intermediate and Advanced SQL like CTE's, Window Functions, Nested Subqueries and Joins to gain relevant insights from the data.

Database:- Click here

Tables Structure

usersrestaurantsordersorder_detailsmenufood
user_id
name
email
password
r_id
r_name
cuisine
rating
order_id
user_id
r_id
amount
date
id
order_id
f_id
menu_id
f_id
r_id
price
f_id
f_name
type

primary_id for each table is in bold letters

SQL Analysis

Q1. Find customers who have never ordered
Ans. Anupama and Rishabh

Q2. Find average Price per dish

f_name avg_price
Chicken popcorn 300
Chicken Wings 230
Choco Lava Cake 98.33
Masala Dosa 180
Non Veg Pizza 450
Rava Idli 120
Rice Meal 213.33
Roti Meal 140
Schezwan Noodles 220
Veg Manchurian 180
Veg Pizza 400



Q3. Top restaurant in terms of number of orders for a given month
Ans Dosa Plaza



Q4. Find restaurants with monthly sales greater than 700 for a July month
Ans dominos and kfc



Q5. Find restaurants with max repeated customers

r_name uniuqe_customers
KFC 2



Q6. Month Over Month revenue growth of Swiggy

Month_num Monthly_revenue_growth
5 NULL
6 32.78
7 50.46

The above values are in %ages with respect to previous month



Q7. Find the most loyal customers for all restaurant

r_name name
Dosa Plaza Ankit
kfc Neha
box8 Nitish
kfc Vartika

There are more questions discussed in coding file but their ouptut varies with different inputs

About

In this case study, I have used different concepts of intermediate and Advanced SQL like CTE's, Window Functions, Nested Subqueries and Joins to gain relevant insights from the data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published