• 4 tables
  • 28,111 rows
  • 7 formats
  • SQL edition
  • synthetic data

Inventory Management Dataset for SQL

This ready-made dataset provides 28,111 records across 4 tables for inventory management analysis. Practice your SQL skills by querying stock levels, transaction history, and product details. A free sample is available, with full download requiring credits.

  • last updated 7 Oct 2026
  • by GoMask
  • Contains 28,111 rows across 4 tables.
  • Covers inventory levels, product details, warehouse information, and transactions.
  • Data spans from 2023-01-01 to 2024-06-30.
  • Includes product IDs, names, categories, and unit prices.
  • Transaction data details inbound and outbound stock movements.

At a glance

  • 4tables
  • 28,111rows
  • 18columns
  • Jan 2023 – Jun 2024date range

The 4 tables

preview and data dictionary per table

Products products · table · 3,000 rows

Contains details about each product.

Preview

First 10 of 3,000 rows of the Products table
product_iduuidproduct_namestringcategorystringunit_pricedecimal
32f34a49-c967-40a3-8abe-6e6e5b1ea5cdGaming MousepadAccessories37.49
a0f0ed83-452f-44f7-83ad-bc956bf5f19eKeyboardAccessories57.67
d8432a4f-79ea-46f9-96b6-5db31fd8b892KeyboardAccessories104.23
1b237f0c-2eba-4efb-8c39-e9fefe5de53dKeyboardAccessories34.16
f9047d40-38b0-4657-8082-0351595ef365USB-C HubAccessories41.23
15c71fb0-8c81-4641-ad48-95bfb4b35f2eUSB-C HubAccessories28.45
b433a0d8-dc39-42e7-a9fd-05e03985b603Gaming MousepadAccessories46.48
d139506e-c3eb-46c9-b49f-d1d1d2056eacKeyboardAccessories74.22
81e07aee-9101-4219-970a-43f44c4eeeb3KeyboardAccessories117.71
6e92e8dd-1e78-48d9-bce1-49edf973b037Gaming MousepadAccessories48.79
10 of 3,000 rows · 4 columns

Data dictionary

Data dictionary for the Products table
columntypedescriptionexamplenull %
product_iduuidUnique primary key identifier for each product.unique32f34a49-c967-40a3-8abe-6e6e5b1ea5cd0%
product_namestringCommercial name or description of the product.Gaming Mousepad0%
categorystringGeneral product classification category.Accessories0%
unit_pricedecimalIndividual unit sales price in USD.37.490%

Warehouses warehouses · dimension table · 10 rows

Lists the different warehouse facilities.

Preview

First 10 of 10 rows of the Warehouses table
warehouse_iduuidwarehouse_namestringlocationstring
9752f3b8-ede2-4c43-9ac6-060272b9560dWarehouse BLos Angeles
7dc1a762-77e3-485f-b78c-d37b63630e3aWarehouse DHouston
95d9af03-3ff2-49a4-b1ac-109c47630aa1Warehouse ANew York
ca737810-76b5-4045-ad9f-b926d4ef9971Warehouse CChicago
0b189bdb-8dfb-473e-b841-3eb2b5ef2e8aWarehouse HSan Diego
b55ee987-d8c1-4015-9db0-a94cb70cf428Warehouse EPhoenix
e7b4d5ca-e3e7-41af-9ed7-c0dcaa2785c5Warehouse FPhiladelphia
bdd2dce3-c35e-4048-a178-833dd7aa3317Warehouse GSan Antonio
a635a6a6-4f20-467e-9a5b-37639aa28d37Warehouse IDallas
12d113ae-c1e0-4667-9949-40ada73c9ea5Warehouse JSan Jose
10 of 10 rows · 3 columns

Data dictionary

Data dictionary for the Warehouses table
columntypedescriptionexamplenull %
warehouse_iduuidUnique identifier for the warehouse facility.unique9752f3b8-ede2-4c43-9ac6-060272b9560d0%
warehouse_namestringStandardized lettered name of the warehouse facility.uniqueWarehouse B0%
locationstringMetropolitan area where the warehouse is physically established.uniqueLos Angeles0%

Inventory levels inventory_levels · fact table · 16,121 rows

Tracks the stock quantity of products in each warehouse.

Preview

First 1 of 16,121 rows of the Inventory levels table
inventory_iduuidstock_quantityintegerlast_updateddatetimeproduct_iduuidwarehouse_iduuid
36bc9d28-adbd-4d84-a438-15ebf970e8475002023-05-29 11:55:10b433a0d8-dc39-42e7-a9fd-05e03985b6030b189bdb-8dfb-473e-b841-3eb2b5ef2e8a
1 of 16,121 rows · 5 columns

Data dictionary

Data dictionary for the Inventory levels table
columntypedescriptionexamplenull %
inventory_iduuidPrimary key uniquely identifying each inventory level record.298e8d3d-78a5-4b73-b507-183e963baeff0%
stock_quantityintegerCurrent on-hand stock quantity of the product at this warehouse facility.670%
last_updateddatetimeTimestamp indicating the last time stock levels were verified or updated in this warehouse.2024-04-30 13:45:330%
product_iduuidForeign key to products.product_id.d7c2f952-9511-4923-ab38-af65c1720b420%
warehouse_iduuidForeign key to warehouses.warehouse_id.ca737810-76b5-4045-ad9f-b926d4ef99710%

Transactions transactions · fact table · 8,980 rows

Records all stock movements into and out of warehouses.

Preview

First 10 of 8,980 rows of the Transactions table
transaction_iduuidtransaction_typestringquantityintegertransaction_datedatetimeproduct_iduuidwarehouse_iduuid
f4cfb739-a559-43e9-b132-fdc50c011e75OUT12024-01-24 06:35:03e0e5c109-f196-4eb5-85b7-e4f70419f04495d9af03-3ff2-49a4-b1ac-109c47630aa1
66b14d89-ae7e-4c9d-8b85-0bfbeb8d4a9dOUT12023-06-15 14:10:0662aa5f32-25e9-4eab-85dd-47284f24c62eca737810-76b5-4045-ad9f-b926d4ef9971
9e6eff5d-47c2-4599-9fad-1dcb89bd97f0OUT22023-06-28 09:43:493e4bb0d4-a55e-437f-aebe-bee16fc02315ca737810-76b5-4045-ad9f-b926d4ef9971
c9dc3332-8453-44d4-a24a-5fe2d9be1d85OUT12023-09-17 08:04:10a7a18fe9-8c05-4b29-816d-4708d1f2975695d9af03-3ff2-49a4-b1ac-109c47630aa1
2b309215-c8a8-48b9-89d6-c4b40698f6f2OUT192023-02-21 14:16:37597e6ff3-21ef-4fca-af75-1407cfe7120195d9af03-3ff2-49a4-b1ac-109c47630aa1
be108952-f81a-4565-9970-ec007bfadffaOUT162024-06-10 09:45:20ced0c9ab-842d-475d-b3b1-e53786ffc0e00b189bdb-8dfb-473e-b841-3eb2b5ef2e8a
bf43d177-005e-4aff-b270-f97494fbc0deOUT72024-06-07 13:11:5805149360-2575-497d-908a-59b936c534449752f3b8-ede2-4c43-9ac6-060272b9560d
9f7e168e-5196-40dc-942e-9d36d1e01a4bOUT72023-04-12 12:38:2654a6a12c-6b93-45d9-847d-e35f63f004ef7dc1a762-77e3-485f-b78c-d37b63630e3a
a762151a-bf05-4b4a-a6b7-64793dc74869OUT82024-05-02 13:33:16d40bc8e3-ba0b-4e2d-8fdd-441897bc57120b189bdb-8dfb-473e-b841-3eb2b5ef2e8a
9a419446-7034-49ca-b9a9-ff9e363d82c5OUT32023-08-10 10:26:576571a2cb-c78b-441d-800e-0b7e1ab7b1d10b189bdb-8dfb-473e-b841-3eb2b5ef2e8a
10 of 8,980 rows · 6 columns

Data dictionary

Data dictionary for the Transactions table
columntypedescriptionexamplenull %
transaction_iduuidUnique identifier for the inventory transaction record.f4cfb739-a559-43e9-b132-fdc50c011e750%
transaction_typestringDirection of stock movement (IN for inbound replenishment, OUT for outbound dispatch).OUT0%
quantityintegerNumber of product units transferred in the transaction.10%
transaction_datedatetimeTimestamp indicating when the inventory transaction took place.2024-01-24 06:35:030%
product_iduuidForeign key to products.product_id.e0e5c109-f196-4eb5-85b7-e4f70419f0440%
warehouse_iduuidForeign key to warehouses.warehouse_id.95d9af03-3ff2-49a4-b1ac-109c47630aa10%

How the tables join

  • inventory_levels.product_id references products.product_idmany to one: each Inventory levels row points to one Products row
  • inventory_levels.warehouse_id references warehouses.warehouse_idmany to one: each Inventory levels row points to one Warehouses row
  • transactions.product_id references products.product_idmany to one: each Transactions row points to one Products row
  • transactions.warehouse_id references warehouses.warehouse_idmany to one: each Transactions row points to one Warehouses row

Questions to answer with it

  1. Write a SQL query to identify products that have not had any outgoing transactions in the last 90 days.

    Filter transactions by type and date, then find products not present in the result.

    tables: products, transactions

  2. Write a SQL query to calculate the total stock quantity for each product across all warehouses.

    Join products and inventory_levels, then group by product and sum the quantity.

    tables: products, inventory_levels

  3. Write a SQL query to find the average stock quantity per warehouse for each product category.

    Join all three tables, group by category and warehouse, then calculate the average stock quantity.

    tables: products, inventory_levels, warehouses

  4. Write a SQL query to list all products and their total stock quantity, showing 0 if a product has no inventory records.

    Use a LEFT JOIN from products to inventory_levels and sum quantities, handling NULLs.

    tables: products, inventory_levels

Starter SQL

run against this data before publishing

Table names match the SQLite file and the SQL script.

Total Stock Quantity Per Product

sql
SELECT p.product_name, SUM(il.stock_quantity) AS total_stock
FROM products p
JOIN inventory_levels il ON p.product_id = il.product_id
GROUP BY p.product_name
ORDER BY total_stock DESC
LIMIT 20;

Products with No Outgoing Transactions in 90 Days

sql
SELECT p.product_name
FROM products p
LEFT JOIN (
    SELECT DISTINCT product_id
    FROM transactions
    WHERE transaction_type = 'OUT' AND transaction_date >= DATE('now', '-90 day')
) AS recent_outbound ON p.product_id = recent_outbound.product_id
WHERE recent_outbound.product_id IS NULL
LIMIT 20;

Average Stock Quantity by Category and Warehouse

sql
SELECT w.warehouse_name, p.category, AVG(il.stock_quantity) AS average_stock
FROM warehouses w
JOIN inventory_levels il ON w.warehouse_id = il.warehouse_id
JOIN products p ON il.product_id = p.product_id
GROUP BY w.warehouse_name, p.category
ORDER BY w.warehouse_name, p.category
LIMIT 20;

Product Stock Quantity with 0 for No Inventory

sql
SELECT p.product_name, COALESCE(SUM(il.stock_quantity), 0) AS total_stock
FROM products p
LEFT JOIN inventory_levels il ON p.product_id = il.product_id
GROUP BY p.product_name
ORDER BY p.product_name
LIMIT 20;

Load it with pandas

python
import pandas as pd

# Unzip the CSV download first: one file per table
products = pd.read_csv("products.csv")
warehouses = pd.read_csv("warehouses.csv")
inventory_levels = pd.read_csv("inventory_levels.csv")
transactions = pd.read_csv("transactions.csv")

# Join inventory_levels to products
df = inventory_levels.merge(products, left_on="product_id", right_on="product_id", how="left", suffixes=("", "_products"))
print(df.groupby("product_name").size().sort_values(ascending=False))

Using it in your tool

SQL
The dataset is available as an SQLite database file. You can load this file into any SQLite-compatible tool or convert it to other SQL formats. Primary keys and foreign keys are defined to facilitate joins between tables.

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 was generated using GoMask DataFactory.
  • Includes synthetic product, warehouse, inventory, and transaction records.
  • Relationships between tables are maintained via foreign keys.
  • Checked by an automated quality gate: unique keys, no orphan foreign keys, required columns filled, declared rules and date ranges (realism score 92).

Limitations

  • The data is synthetic and does not represent real-world inventory movements.
  • Specific details like supplier information or detailed product specifications are not included.
  • Distributions and correlations are modelled, not measured from real records.

blueprint · inventory-management-dataset-for-sql

Scale this dataset

Same tables. As many rows as you need.

Open the blueprint behind these 4 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
Scale this dataset in Data Factory
Tables
products, warehouses, inventory_levels, transactions
Licence
yours to use, including commercially
API slug
inventory-management-dataset-for-sql

What should your data show?

Preview 20 rows free
No signup. No card.