This project analyzes a Food Delivery Platform database using SQL to uncover valuable business insights related to customers, restaurants, menu items, orders, revenue, and delivery performance.
The project demonstrates practical SQL skills frequently used by Data Analysts, including data exploration, joins, subqueries, views, window functions, and business reporting.
The project uses four relational tables.
| Table | Description |
|---|---|
| Customers | Customer demographics |
| Restaurants | Restaurant information |
| Menu | Menu items and pricing |
| Orders | Order transactions and delivery details |
Customers
---------
cid
cname
age
gender
Restaurants
------------
res_id
res_name
city
location
Menu
------
menu_id
res_id
item_name
veg_nonveg
res_price
app_price
Orders
--------
order_id
menu_id
cust_id
qty
order_date
order_time
eta
delivery_time
- Explore the database
- Analyze customer ordering behaviour
- Measure restaurant performance
- Evaluate delivery efficiency
- Perform pricing analysis
- Generate business insights using SQL
- MySQL
- MySQL Workbench
- SQL
- SELECT
- WHERE
- ORDER BY
- GROUP BY
- HAVING
- DISTINCT
- LIMIT
- COUNT()
- SUM()
- AVG()
- MIN()
- MAX()
- INNER JOIN
- LEFT JOIN
- CASE WHEN
- MONTH()
- YEAR()
- TIMEDIFF()
- MINUTE()
- DATEDIFF()
- Subqueries
- Views
- Window Functions
- Ranking Functions
- LEAD()
- DENSE_RANK()
- SUM() OVER()
- AVG() OVER()
- Total number of orders
- Dataset exploration
- Understanding database relationships
- Top 5 customers by quantity ordered
- Customers with multiple orders
- Customers ordering from multiple restaurants
- Customers spending above gender average
- Latest order of every customer
- Customers with consecutive-day orders
- Preferred restaurant of each customer
- Restaurants with highest orders
- Restaurant revenue analysis
- Restaurants performing above average revenue
- Revenue contribution of each restaurant
- Average delivery delay per restaurant
- Most expensive item in every restaurant
- Menu items never ordered
- Top ordered items per restaurant
- Bottom ordered items overall
- Menu items where app price exceeds restaurant price
- Monthly revenue
- Running monthly revenue
- Customer spending
- Restaurant revenue comparison
- Aggregate Analysis
- Multi-table Joins
- Nested Subqueries
- Views
- Window Functions
- Ranking
- Running Totals
- Business KPIs
Food-Delivery-SQL-Analysis
│
├── Dataset
│ ├── customers.csv
│ ├── restaurants.csv
│ ├── menu.csv
│ └── orders.csv
│
├── SQL Scripts
│ ├── EDA.sql
│ └── Advance_Analysis.sql
│
│
└── README.md
Clone the repository.
git clone https://github.com/yourusername/Food-Delivery-SQL-Analysis.gitCreate the database.
CREATE DATABASE IM_Project;
USE IM_Project;Import the CSV files into MySQL.
- customers.csv
- restaurants.csv
- menu.csv
- orders.csv
Run the SQL scripts in the following order:
- EDA.sql
- Advance_Analysis.sql
- Identify high-value customers
- Measure restaurant performance
- Analyze customer purchasing behaviour
- Detect pricing differences between restaurants and app listings
- Track monthly revenue trends
- Evaluate delivery delays
- Discover customer preferences
- Measure restaurant contribution to total revenue
- SQL Query Writing
- Relational Database Analysis
- Business Intelligence
- Customer Analytics
- Revenue Analysis
- Window Functions
- Data Exploration
- Advanced SQL Problem Solving
Aryan Shahi
Aspiring Data Analyst
- SQL
- Python
- Power BI
- Excel
- Statistics
Connect with me on LinkedIn and GitHub.
⭐ If you found this project useful, consider giving it a star!