• Healthcare
  • 3 tables
  • 77,059 rows
  • 7 formats
  • synthetic data

Pharmacy Dataset for Analysis

This is a ready-made synthetic dataset for pharmacy sales and inventory analysis. It covers transactions and stock levels between 2023-01-01 and 2024-12-31. A free sample is available, with full downloads costing credits.

  • last updated 29 Sept 2026
  • by GoMask
  • Dataset contains 3 tables: products, inventory, and sales.
  • Covers sales and inventory data from 2023-01-01 to 2024-12-31.
  • Includes 77,059 total rows across all tables.
  • Available in CSV, Excel, SQL, and other formats.
  • Free sample available for preview.

At a glance

  • 3tables
  • 77,059rows
  • 15columns
  • Jan 2023 – Dec 2024date range

The 3 tables

preview and data dictionary per table

Products products · dimension table · 500 rows

Catalog of pharmacy products.

Preview

First 10 of 500 rows of the Products table
product_iduuidproduct_namestringcategorystringunit_costdecimallist_pricedecimal
39854299-c476-4d4f-8ae8-00ab1b9469d5Amlodipine BesylatePrescription24.8245.57
387d1de3-9aa0-4070-84e6-1937c673943bAtorvastatin CalciumPrescription27.6766.04
6dde6dfb-8408-46cc-ab66-d808818467ddLisinopril DiureticPrescription4196.98
de3db61d-b74c-4e56-bf05-f394ced8a7b2Metformin HClPrescription11.9619.6
7c2cf757-afd9-4c9f-bbef-edbdffb399e4SimvastatinPrescription24.9931.97
4cfddbcf-06c6-4cbe-8c77-a54296b751e4Levothyroxine SodiumPrescription22.7633.89
d40bc8e3-ba0b-4e2d-8fdd-441897bc5712Albuterol SulfatePrescription13.8922.19
149c7502-dedf-4f6d-a29e-17ace2736033Omeprazole Delayed ReleasePrescription30.3544.14
9477015b-c015-482d-86b8-bb08c55a4ba1Losartan PotassiumPrescription19.1437.16
b17c9f2b-4bfd-4770-95e9-e81b8465fef8GabapentinPrescription10.9717.72
10 of 500 rows · 5 columns

Data dictionary

Data dictionary for the Products table
columntypedescriptionexamplenull %
product_iduuidUnique identifier for each pharmacy catalog product.unique39854299-c476-4d4f-8ae8-00ab1b9469d50%
product_namestringTrade name, brand name, or generic clinical formulation of the medication or supply item.Amlodipine Besylate0%
categorystringClassification category indicating legal and operational dispensation type.Prescription0%
unit_costdecimalWholesale acquisition cost per unit incurred by the pharmacy.24.820%
list_pricedecimalStandard shelf or baseline retail price charged to customers before promotional discounts.45.570%

Inventory inventory · dimension table · 71,559 rows

Snapshot records of product inventory levels.

Preview

First 10 of 71,559 rows of the Inventory table
inventory_iduuidsnapshot_datedatequantity_on_handintegerproduct_iduuid
b38a91e5-7703-42bc-bfc1-0a86200159a72024-04-30612d40bc8e3-ba0b-4e2d-8fdd-441897bc5712
83322970-41aa-40c2-aa99-cc957af720742023-03-3142039854299-c476-4d4f-8ae8-00ab1b9469d5
c4399186-6264-4055-a1a6-20781d41cd702024-12-145886dde6dfb-8408-46cc-ab66-d808818467dd
fe3f6956-5b76-4cf2-b017-30238a198e9b2024-12-085274cfddbcf-06c6-4cbe-8c77-a54296b751e4
888c43c0-f28d-4c3c-97ee-d4b9d03363042023-09-282766dde6dfb-8408-46cc-ab66-d808818467dd
369be0f1-6e8f-4f2c-a08a-6abd84d408c42024-02-025254cfddbcf-06c6-4cbe-8c77-a54296b751e4
e80729c6-0631-403d-9497-7e00082567292023-09-18210de3db61d-b74c-4e56-bf05-f394ced8a7b2
3ca5a5aa-12c3-4834-af78-a205c97bce9f2024-08-041486dde6dfb-8408-46cc-ab66-d808818467dd
0dbe20d5-8cb2-414b-a646-745afe52ec982024-05-154344cfddbcf-06c6-4cbe-8c77-a54296b751e4
fc42ea90-a262-4d66-a827-6452c8ee34ef2023-02-023477c2cf757-afd9-4c9f-bbef-edbdffb399e4
10 of 71,559 rows · 4 columns

Data dictionary

Data dictionary for the Inventory table
columntypedescriptionexamplenull %
inventory_iduuidUnique primary key identifier for the inventory snapshot record.8f90108b-61e0-4aa5-994b-7137acf59a600%
snapshot_datedateThe date when this inventory level was recorded.2024-09-050%
quantity_on_handintegerNumber of units physically available in stock at snapshot time.4400%
product_iduuidForeign key to products.product_id.443d3384-dc11-41e4-ae6a-5d86426b8f8e0%

Sales sales · table · 5,000 rows

Records of individual sales transactions.

Preview

First 10 of 5,000 rows of the Sales table
sale_iduuidsale_datedatequantity_soldintegerunit_pricedecimaltransaction_totaldecimalproduct_iduuid
472a134a-9d59-4fc3-927e-f4587556e95f2024-10-23129.4329.433b39d8c0-1154-4dd0-8a49-2fbde7cc7580
70840626-8e32-4639-bdcd-ebea272216402024-04-28174.0874.0816ef8115-591c-4e40-a0bf-ac2e3727bb59
7a133b26-eb1d-4b28-83e6-6b79058808962024-07-25158.8358.838f0c2d20-035b-471f-ad16-8a7fb72936d6
ca3a6a1a-e9e3-45bc-b823-ec0db69c6ff92024-12-17118.6518.65c6178f74-2ec4-4d4a-b70b-d9dc8e39e179
0689fc85-9151-447b-bcfb-a4a2342642b12023-01-02126.6526.65aab6cf28-efbe-42d9-9d36-5717fc5973e0
231b49b8-7d25-4580-b250-dd1df10aa25f2024-03-31115.9815.98e3450983-0efe-4dcc-a4d3-6257f4ad5482
7b8da670-c27f-4de7-94f9-ce9a20f625492023-04-07162.0862.08681d9925-98a7-4b01-99bb-7f0bd3a63ba2
dea79660-5f7a-4fea-b204-6d1c7dc838252024-07-11135.0235.0224efb3e6-917d-4417-95ed-ce5670ac39e0
ddd6ef25-e70d-4ff6-8427-0029844439f92023-06-19121.9821.98dd6437a4-0147-4679-8dfd-2e865f8c5251
4b40ebb9-4844-4825-bedb-0f71f76985802023-04-02122.7622.76f7326eda-e280-42bf-a549-7933c5a10379
10 of 5,000 rows · 6 columns

Data dictionary

Data dictionary for the Sales table
columntypedescriptionexamplenull %
sale_iduuidUnique identifier for the sale transaction.unique472a134a-9d59-4fc3-927e-f4587556e95f0%
sale_datedateDate when the sale transaction occurred.2024-10-230%
quantity_soldintegerTotal quantity of product units sold in the transaction.10%
unit_pricedecimalActual unit selling price of the product after retail variations or discounts.29.430%
transaction_totaldecimalTotal dollar amount of the sale transaction, equal to quantity_sold times unit_price.29.430%
product_iduuidForeign key to products.product_id.3b39d8c0-1154-4dd0-8a49-2fbde7cc75800%

How the tables join

  • inventory.product_id references products.product_idmany to one: each Inventory row points to one Products row
  • sales.product_id references products.product_idmany to one: each Sales row points to one Products row

Questions to answer with it

  1. Which products have the highest sales volume (total quantity sold)? Show top 10 products.

    Join sales and products tables, group by product, sum quantity_sold, order by sum DESC.

    tables: sales, products

  2. Identify products that are low in inventory (quantity_on_hand < 50) but high in demand (average daily sales > 5).

    Calculate average daily sales per product from sales, then join with inventory and filter.

    tables: sales, inventory, products

  3. Analyze the sales trend of prescription versus over-the-counter drugs over time.

    Join sales and products, group by category and date, sum transaction_total.

    tables: sales, products

Starter SQL

run against this data before publishing

Table names match the SQLite file and the SQL script.

Top 20 Products by Quantity Sold

sql
SELECT p.product_name, SUM(s.quantity_sold) AS total_quantity
FROM sales s
JOIN products p ON s.product_id = p.product_id
GROUP BY p.product_name
ORDER BY total_quantity DESC
LIMIT 20;

Monthly Sales Trend by Category

sql
SELECT
  strftime('%Y-%m', s.sale_date) AS sale_month,
  p.category,
  SUM(s.transaction_total) AS monthly_revenue
FROM sales s
JOIN products p ON s.product_id = p.product_id
GROUP BY sale_month, p.category
ORDER BY sale_month, p.category
LIMIT 20;

Total Revenue per Product Category

sql
SELECT
  p.category,
  SUM(s.transaction_total) AS total_revenue
FROM sales s
JOIN products p ON s.product_id = p.product_id
GROUP BY p.category
ORDER BY total_revenue DESC
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")
inventory = pd.read_csv("inventory.csv")
sales = pd.read_csv("sales.csv")

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

Using it in your tool

Excel
Load each table into a separate sheet. Use XLOOKUP or Power Query to join tables. Create a PivotTable on the sales data, grouping by product category and date.
Power BI
Create a star schema with 'products' as the dimension table and 'sales' and 'inventory' as fact tables. Establish relationships on 'product_id'. DAX measures could include Total Sales Amount and Current Stock Level.
SQL
Load the SQLite or SQL dump into your preferred database. Primary keys are defined in the schema. Join tables using product_id to link sales and inventory to product details.
Python
Use pandas to load CSV or SQL data. Merge tables on 'product_id'. Analyze sales trends and inventory levels using DataFrame operations.

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 generated using GoMask DataFactory.
  • Synthetic data mimics typical pharmacy operations.
  • Includes product details, inventory snapshots, and sales transactions.
  • 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 dataset is synthetic and does not represent actual sales or inventory.
  • No customer information is included.
  • Inventory snapshots are not real-time.
  • Distributions and correlations are modelled, not measured from real records.

blueprint · pharmacy-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
Scale this dataset in Data Factory
Tables
products, inventory, sales
Licence
yours to use, including commercially
API slug
pharmacy-dataset

What should your data show?

Preview 20 rows free
No signup. No card.