0% found this document useful (0 votes)
21 views

Swiggy Analysis Using MYSQL Report

The document provides a series of SQL queries for analyzing restaurant data from Swiggy. It covers various aspects such as restaurant ratings, city rankings, cuisine types, average costs, and vegetarian options. Each query addresses a specific analytical question related to the dataset.

Uploaded by

Yash Mane
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Swiggy Analysis Using MYSQL Report

The document provides a series of SQL queries for analyzing restaurant data from Swiggy. It covers various aspects such as restaurant ratings, city rankings, cuisine types, average costs, and vegetarian options. Each query addresses a specific analytical question related to the dataset.

Uploaded by

Yash Mane
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Swiggy Analysis Using MYSQL

1. How many restaurants have a rating greater than 4.4?

 select * from swiggy where rating > 4.4;

2. Which is the top city with have highest number of restaurants?

select city, count(distinct restaurant_name) as


highest_restaurant_count from swiggy

order by city desc;

3. How many restaurants have the word “pizza” in their name?

 select restaurant_name as pizza_restaurant from swiggy where


restaurant_name like

"%pizza%";
4.What is the most common cuisine among the restaurant In the dataset?

 select cuisine,count(*) as cuisine_count from swiggy group by cuisine


order by

cuisine_count desc limit 1;

5.what is the average rating of restaurants in each city?

 select city,avg(rating) as average_rating from swiggy group by city;

6.What is the highest price of item under the recommended menu category
for each restaurant?

 select distinct restaurant_name,menu_category,max(price) as


highestprice from swiggy where menu_category='recommended'
group by restaurant_name,menu_category;
7.Find the restaurants that have an average cost which is higher than the
total average cost of all restaurants together?

select distinct restaurant_name,cost_per_person from swiggy where

cost_per_person>(select avg(cost_per_person) from swiggy);

8.Retrieve the Details of restaurants that have the same name but are
located in different cities?

select distinct t1.restaurant_name, t1.city, t2.city from swiggy t1 join


swiggy t2 on t1.restaurant_name = t2.restaurant_name and
t1.city<>t2.city;

9.Which restaurant offers the most number of items in the main course
category?

 select distinct t1.restaurant_name, t1.city, t2.city from swiggy t1 join


swiggy t2 on t1.restaurant_name = t2.restaurant_name and
t1.city<>t2.city;

10.List the Names of restaurants that are 100% vegetarian in alphabetical


order of restaurants name?
 select distinct restaurant_name, (count(case when veg_or_nonveg='Veg'
then 1 end)*100/ count(*)) as vegetarian_percetage from swiggy group by
restaurant_name having vegetarian_percetage=100.00 order by
restaurant_name;

11.which is the restaurant providing the lowest average price for all items?

 select distinct restaurant_name, avg(price) as average_price from swiggy


group by

restaurant_name order by average_price limit 1;

12.Which top 5 restaurant offers highest number of categories?

 select distinct restaurant_name, count(distinct menu_category) as


no_of_categories

from swiggy group by restaurant_name order by no_of_categories desc


limit 5;
13. Which restaurant provides the highest percentage of non-vegetarian
food?

 select distinct restaurant_name, (count(case when veg_or_nonveg='Non-


veg' then 1 end)*100 /count(*)) as nonvegetarian_percentage from swiggy
group by restaurant_name order by nonvegetarian_percentage desc limit 1;

You might also like