Restaurant Sales Dataset for Business Analysis
This is a ready-made synthetic dataset for restaurant sales analysis. It includes data on customers, menu items, and orders, perfect for practicing dashboard creation in tools like Power BI and Excel. A free sample is available, with the full download costing credits.
At a glance
- 3tables
- 25,937rows
- 21columns
- Jan 2023 – Dec 2024date range
The 3 tables
preview and data dictionary per tableCustomers customers · table · 5,000 rows
Contains information about individual customers.
Preview
| customer_iduuid | first_namestring | last_namestring | emailstring | citystring | statestring | customer_segmentstring | loyalty_tierstring | signup_datedate |
|---|---|---|---|---|---|---|---|---|
| d854d530-795b-4610-b761-69fa77e2b699 | Maria | Smith | [email protected] | Phoenix | Arizona | Consumer | Bronze | 2021-12-14 |
| ad28b45b-9e3d-4818-89d4-5617926bf7d9 | David | Stewart | [email protected] | Los Angeles | California | Consumer | Silver | 2023-04-26 |
| f3de899a-5dff-4a8f-a4e6-956a9b3f02b6 | Maria | Sullivan | [email protected] | Austin | Texas | Consumer | Silver | 2023-12-31 |
| 53d9a1fc-5cee-4e70-a86e-4acda530824f | Michael | Scott | [email protected] | San Antonio | Texas | Consumer | Silver | 2020-04-01 |
| edbd3c4b-7c50-4ec7-9dad-b5be040e0dcc | Olivia | Simpson | [email protected] | Phoenix | Arizona | Consumer | Bronze | 2023-08-26 |
| fdb70afe-d7e4-4a82-9e9f-225c9054d46d | James | Stevens | [email protected] | Los Angeles | California | Consumer | Bronze | 2023-11-09 |
| ed603934-b96c-40c3-acd6-cdf891993b51 | Emma | Stone | [email protected] | San Antonio | Texas | Consumer | Silver | 2021-11-15 |
| 59cc5b1b-b16f-4a3a-bb1e-2e3cc7e7792d | William | Spencer | [email protected] | Chicago | Illinois | Consumer | Bronze | 2023-02-25 |
| bbbdfd4c-e3cf-41db-9f9a-380601d0260f | Ava | Sterling | [email protected] | Austin | Texas | Consumer | Bronze | 2023-11-19 |
| 3306a2ff-b7c9-4991-8e48-5b6a1c124974 | Alexander | Shaw | [email protected] | San Antonio | Texas | Consumer | Bronze | 2020-08-08 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
customer_ | uuid | Unique identifier for each customer record.unique | d854d530-795b-4610-b761-69fa77e2b699 | 0% |
first_ | string | Customer's first name. | Maria | 0% |
last_ | string | Customer's last name. | Smith | 0% |
email | string | Customer's primary email address.unique | [email protected] | 0% |
city | string | City of customer residence. | Phoenix | 0% |
state | string | State of customer residence. | Arizona | 0% |
customer_ | string | Customer classification segment. | Consumer | 0% |
loyalty_ | string | Customer loyalty program status tier. | Bronze | 0% |
signup_ | date | Date when customer joined the restaurant loyalty program. | 2021-12-14 | 0% |
Orders orders · fact table · 20,837 rows
Records of customer orders, including item details and pricing.
Preview
| order_iduuid | order_datedate | quantityinteger | unit_pricedecimal | discount_percentdecimal | line_totaldecimal | customer_iduuid | item_iduuid |
|---|---|---|---|---|---|---|---|
| 7eaa1554-cc2c-4c4b-8733-a6cfb8a40dd6 | 2024-04-08 | 1 | 12.31 | 0 | 12.31 | ad28b45b-9e3d-4818-89d4-5617926bf7d9 | becefc35-9756-44a1-9a35-608b48a31b64 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
order_ | uuid | Unique identifier for the order record. | 7eba63af-afc6-4dcf-b46a-65d03a2eed7e | 0% |
order_ | date | Date when the order was placed. | 2023-02-28 | 0% |
quantity | integer | Number of units purchased for the menu item. | 1 | 0% |
unit_ | decimal | Actual price per item charged for this order, accommodating +/- 10% price variation against base menu price. | 34.4 | 0% |
discount_ | decimal | Promotional or loyalty discount percentage applied to this line item. | 21 | 0% |
line_ | decimal | Net total price for this order item after discount calculation: quantity * unit_price * (1 - discount_percent / 100). | 27.18 | 0% |
customer_ | uuid | Foreign key to customers.customer_id. | 61558553-cbab-4cdc-9aba-7de7b43c83c7 | 0% |
item_ | uuid | Foreign key to menu_items.item_id. | 63bec6bb-c7c3-48aa-bdf2-d9a88e7080da | 0% |
How the tables join
orders.customer_id references customers.customer_idmany to one: each Orders row points to one Customers roworders.item_id references menu_items.item_idmany to one: each Orders row points to one Menu items row
Questions to answer with it
What are the most popular menu items by quantity sold?
Join orders and menu_items, then group by item_name and sum quantity.
tables: orders, menu_items
Which hours of the day have the highest order volume?
Extract the hour from order_date, then group by hour and count orders.
tables: orders
Calculate the average order value per customer.
Join orders and customers, group by customer_id, and calculate the average of line_total.
tables: orders, customers
Analyze sales trends by customer segment and loyalty tier.
Join orders and customers, group by customer_segment and loyalty_tier, and sum line_total.
tables: orders, customers
Starter SQL
run against this data before publishingTable names match the SQLite file and the SQL script.
Top 20 Menu Items by Quantity Sold
SELECT mi.item_name, SUM(o.quantity) AS total_quantity
FROM orders o
JOIN menu_items mi ON o.item_id = mi.item_id
GROUP BY mi.item_name
ORDER BY total_quantity DESC
LIMIT 20;Total Sales per Customer Segment
SELECT c.customer_segment, SUM(o.line_total) AS total_sales
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id
GROUP BY c.customer_segment
ORDER BY total_sales DESC
LIMIT 20;Average Order Value by Loyalty Tier
SELECT c.loyalty_tier, AVG(o.line_total) AS average_order_value
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id
GROUP BY c.loyalty_tier
ORDER BY average_order_value DESC
LIMIT 20;Daily Sales Trend
SELECT order_date, SUM(line_total) AS daily_sales
FROM orders
GROUP BY order_date
ORDER BY order_date
LIMIT 20;Load it with pandas
import pandas as pd
# Unzip the CSV download first: one file per table
customers = pd.read_csv("customers.csv")
menu_items = pd.read_csv("menu_items.csv")
orders = pd.read_csv("orders.csv")
# Join orders to customers
df = orders.merge(customers, left_on="customer_id", right_on="customer_id", how="left", suffixes=("", "_customers"))
print(df.groupby("city").size().sort_values(ascending=False))Using it in your tool
- Excel
- Load each table into a separate Excel sheet. Use Power Query to join tables (e.g., orders with menu_items on item_id). Create a PivotTable from the joined data to analyze sales by category or customer segment.
- Power BI
- Load all tables. Create relationships: orders.customer_id to customers.customer_id, and orders.item_id to menu_items.item_id. Create measures like Total Sales = SUM(orders[line_total]) and Average Order Quantity = AVERAGE(orders[quantity]).
- SQL
- Load the SQLite or SQL relational download. The primary keys are customer_id, item_id, and order_id. Join tables using these keys, for example, `FROM orders o JOIN customers c ON o.customer_id = c.customer_id`.
- Python
- Use pandas to load CSV or Parquet files. Join tables using `pd.merge()` and perform aggregations with `.groupby()`. For example: `orders.merge(menu_items, on='item_id').groupby('item_name')['quantity'].sum()`.
Formats available
- CSV (zip)One CSV file per table, zipped
- Excel workbookOne worksheet per table
- SQLite databaseA ready-to-query database file with every table
- Parquet (zip)One Parquet file per table, zipped
- SQL scriptCREATE TABLE with primary and foreign keys, then INSERTs
- CSVA single CSV file
- JSONA single JSON file
How this data was generated
Synthetic data. Every row was generated: no real people, customers or companies are in this dataset.
Synthetic data generated by GoMask DataFactory from a relational blueprint: keys, links and rules are enforced in code, text columns are filled by a language model. No real people, companies or transactions.
- Data is synthetically generated using GoMask DataFactory.
- Customer and order data are correlated to simulate realistic purchasing patterns.
- Menu item prices have a +/- 10% variation in orders compared to the base price.
- Checked by an automated quality gate: unique keys, no orphan foreign keys, required columns filled, declared rules and date ranges (realism score 100).
Limitations
- The dataset is synthetic and does not represent real-world sales data.
- Does not include external factors like marketing campaigns or competitor pricing.
- Limited to 3 tables and 21 columns, may not cover all aspects of restaurant operations.
- Distributions and correlations are modelled, not measured from real records.
Part of these collections
15 SQL practice questions for the Restaurant Sales Dataset for Business Analysis
Written for this data and checked against it: 12 SQL and 3 Power BI exercises from beginner to advanced. Try the first three free; the practice kit has all 15, a starter .sql file and an answer key with every expected result.
Most expensive menu items
Which 10 menu items cost the most? Return item_name, category and price, ordered by price descending and then by item_name ascending.
Tables: menu_items · your result: 3 columns, 10 rowsGold customers in Texas
Which customers have a loyalty_tier of 'Gold' and a state of 'Texas'? Return first_name, last_name, city and signup_date, ordered by signup_date ascending and then by customer_id ascending.
Tables: customers · your result: 4 columns, 430 rowsCustomers per city
How many customers live in each city? Return city and customer_count, ordered by customer_count descending and then by city ascending.
Tables: customers · your result: 2 columns, 10 rows
- 04Revenue by menu categoryBeginner
- 05Power BI: revenue by loyalty tierPower BI
- 06Order size bucketsIntermediate
- 07Monthly revenue in 2024Intermediate
- 08Top spending cities by categoryIntermediate
- 09Average order value by customer segmentIntermediate
- 10Power BI: average discount by categoryPower BI
- 11Rank items within categoryAdvanced
- 12Month-over-month revenue changeAdvanced
- 13Running total and share by stateAdvanced
- 14Signup-year cohort revenueAdvanced
- 15Power BI: orders above item averagePower BI
Get the practice kit: the full dataset, all 15 exercises, a starter .sql and the answer key. One-time $3.99.
Get the practice kit · $3.99blueprint · restaurant-sales-dataset
Scale this dataset
Same tables. As many rows as you need.
Open the blueprint behind these 3 tables in Data Factory: keep the relationships, change a column, and generate it at the size you need.
- 200,000 rows
- 1,000,000 rows
- Tables
- customers, menu_items, orders
- Licence
- yours to use, including commercially
- API slug
- restaurant-sales-dataset