This project contains SQL scripts for managing and analyzing data in a Restaurant Menu Database (restaurant_db). It demonstrates how to use fundamental SQL queries to extract meaningful insights from a menu dataset.
-
View the menu_items table?
-
Find the number of menu_items?
-
What are the least and most expensive items on the menu?
-
How many Italian dishes are on the menu?
-
What are the least and most expensive Italian dishes on the menu?
-
How many dishes are in each category?
-
What is the averag dish price within each category?
-
View the order_details table?
-
What is the date range of the table? 10.How many orders were made within this date range?
-
How many items were orderded within this date range?
-
Which orders had the most number of items?
-
How many orders had more than 12 items?
-
Combine the menu_items and order_items tables into a single table?
-
What were the least and most ordered items? What categories were they in?
-
What were the top 5 orders that spent the most money?
-
View the details of the highest spend order, What insights can you gather from the data?
-
View the details of the top 5 highest spend orders. What insights can you gather from the data?
- Database Used:
restaurant_db - Main Table:
menu_items
- View all menu items
- Count total menu items
- Sort menu items by price (highest to lowest)
- Filter items by category (e.g., Italian)
- Count items per category
- Calculate average price per category
``sql -- View all menu items SELECT * FROM menu_items;
-- Count total menu items SELECT COUNT(*) FROM menu_items;
-- View most expensive items SELECT * FROM menu_items ORDER BY price DESC;
-- Filter by Italian category SELECT * FROM menu_items WHERE category = "Italian" ORDER BY price DESC;
-- Count per category SELECT category, COUNT(menu_item_id) FROM menu_items GROUP BY category;
-- Average price per category SELECT category, AVG(price) FROM menu_items GROUP BY category;
π‘ Purpose This project serves as a practice resource for students and developers looking to:
Improve SQL querying skills
Work with real-world scenarios in MySQL
Understand aggregation and filtering techniques
π οΈ Requirements MySQL installed locally or access to a MySQL server
Basic knowledge of SQL syntax
π How to Use Open your MySQL interface (MySQL CLI, Workbench, phpMyAdmin, etc.)
Create or select a database:
sql Copy Edit CREATE DATABASE restaurant_db; USE restaurant_db; Execute the queries from the MySQL Project.sql file.
π¨βπ» Author Aayush Kumar Vijaykumar Tiwari Student, Siddharth College of Commerce and Economics IT (2024β2025)