Pharmacy Retail Purchase Events

This dataset provides detailed, line-level records of pharmacy retail purchase events, including both over-the-counter and prescription medications. Each record captures transaction details, customer demographics (where available), product specifics, payment method, and prescription information, enabling comprehensive analysis of purchasing patterns, health trends, and market basket behaviors.

  • opened 21 times
  • last updated 22 Jul 2025
  • by GoMask
The brief that made it

Market basket analysis for product bundling and promotions

Sample rows

preview · 8 of 200 rows · all 25 columns
transaction_idstringpayment_methodstringquantityintegerprescription_flagbooleaninsurance_providerstringtransaction_datetimedatetimestore_idstringstore_namestringstore_citystringstore_statestringstore_postal_codestringstore_countrystringcustomer_idstringcustomer_ageintegercustomer_genderstringproduct_idstringproduct_namestringproduct_categorystringproduct_formstringproduct_strengthstringunit_pricefloattotal_pricefloatdiscount_appliedfloatprescriber_idstringprescription_numberstring
TXN000001credit_card2falseblank2023-04-12T10:15:32PH101RxMart DowntownNew YorkNY10001USACUST1000134femaleOTC10001Vitamin D3 Gummiessupplementgummy1000IU7.9915.980blankblank
TXN000002cash1falseblank2023-07-18T17:03:41PH102CareFirst PharmacyLos AngelesCA90017USAblankblankunknownOTC10002Ibuprofen Tabletsanalgesictablet200mg3.493.490blankblank
TXN000003insurance60trueMedicare2022-12-23T14:21:12PH103MediQuick CentralChicagoIL60603USACUST1000267malePRESC1001Metformin HClantidiabetictablet500mg0.2414.42DRS10001RX20221223A
TXN000004debit_card1falseblank2024-01-09T11:57:16PH104PillPointBostonMA02114USACUST1000323otherOTC10003Allergy Relief Syrupallergysyrup5mg/5ml5.995.991blankblank
TXN000005insurance90trueAetna2023-08-27T16:43:28PH105RxMart MidtownHoustonTX77002USACUST1000481malePRESC1002Warfarin Sodiumanticoagulanttablet5mg0.3127.93.5DRJ10002RX20230827B
TXN000006cash1falseblank2023-02-13T09:08:55PH106CareFirst ExpressDuluthMN55802USAblankblankunknownOTC10004Hydrocortisone Creamtopical steroidcream1%6.496.490blankblank
TXN000007insurance28trueBlueCross2023-06-14T18:25:47PH107MediQuickPhoenixAZ85004USACUST1000554femalePRESC1003Amoxicillinantibioticcapsule250mg0.4913.721.5DRM10003RX20230614C
TXN000008mobile_payment1falseblank2022-11-05T13:42:08PH108PillPoint NorthSan FranciscoCA94107USACUST1000641maleOTC10005Cough & Cold Liquidcold remedyliquid10ml4.794.790blankblank

What the 200 rows show

from the 200-row sample

Insurance (payment method) stands out: mean quantity is 43.7, against 2.2 for the rest.

  • 35%prescription_flag = true
  • 1median quantity
  • 3store countries
  • 4customer genders
  • 13store states
  • 17store cities
Mean quantity by payment_method200 rows
040801.6cash44 rows2.9credi…38 rows2.1debit…29 rows43.7insur…70 rows2.6mobil…16 rows1.0other3 rows
quantity200 rows, in bands of 20
07515014330091700010100180quantity →

Median 1, from 1 to 180.

insurance_provider70 rows with a value · 130 left blank
  1. Sunlife20
  2. Medicare11
  3. Aetna11
  4. NHS England11
  5. BlueCross10
  6. Texas Health7
25 columns by typefrom the column list below
  • string 18
  • integer 2
  • float 3
  • datetime 1
  • boolean 1

Columns

25 columns in four groups
blueprint · 25 columns
columntypedescriptionexample
Text 18 columns
transaction_idstringUnique identifier for each purchase transaction event.uniqueTXN000001
store_idstringUnique identifier for the retail pharmacy location where the transaction took place.PH101
store_namestringName of the pharmacy store.optionalRxMart Downtown
store_citystringCity where the pharmacy store is located.optionalNew York
store_statestringState or region where the pharmacy store is located.optionalNY
store_postal_codestringPostal code of the pharmacy store location.optional10001
store_countrystringCountry where the pharmacy store is located.3 countries · optionalUSA
customer_idstringUnique identifier for the customer making the purchase. May be null for anonymous/OTC purchases.optionalCUST10001
customer_genderstringGender of the customer (if available).male · female · other · unknown · optionalfemale
product_idstringUnique identifier for the product purchased.OTC10001
product_namestringName of the product purchased.Vitamin D3 Gummies
product_categorystringCategory of the product (e.g., analgesic, cold remedy, supplement, antibiotic).supplement
product_formstringForm of the product (e.g., tablet, capsule, syrup, cream, spray).optionalgummy
product_strengthstringStrength or dosage of the product (e.g., 500mg, 10ml, 5%).optional1000IU
payment_methodstringPayment method used for the transaction (e.g., cash, credit_card, insurance, mobile_payment).6 values · optionalcredit_card
insurance_providerstringName of the insurance provider if payment was made via insurance.6 providers · optionalMedicare
prescriber_idstringUnique identifier for the prescribing physician (if applicable).optionalDRS10001
prescription_numberstringPrescription number associated with the transaction (if applicable).optionalRX20221223A
Numbers 5 columns
customer_ageintegerAge of the customer at the time of purchase, if available.0 or more · optional34
quantityintegerNumber of units of the product purchased in this transaction.1 or more2
unit_pricefloatPrice per unit of the product at the time of purchase.0 or more7.99
total_pricefloatTotal price paid for this product line (unit_price * quantity, before discounts).0 or more15.98
discount_appliedfloatDiscount amount applied to this product line, if any.0 or more · optional0
Dates and times 1 column
transaction_datetimedatetimeDate and time when the purchase transaction occurred.2023-04-12T10:15:32
True or false 1 column
prescription_flagbooleanIndicates if the purchase was for a prescription medication (true) or over-the-counter (false).false

Use it for

  • prescription f…35%70 of 200 rowsmean quantity by paym…1.6cash2.9cred…2.1debi…43.7insu…

    A healthcare dashboard

    The prescription_flag rate, quantity by payment_method and a breakdown of insurance_provider. Excel, Power BI or Tableau.

  • Why do the 70 insurance rows have a mean quantity of 43.7?

    A root-cause class exercise

    Hand out the rows and one question. The answer is in the data, not in the brief.

  • A software demo

    Believable transactions with transaction_datetime, store_id and store_name to fill a screen in front of a buyer.

Not quite right?

Make it yours.

Same 25 columns, your size and your rules. See 20 rows before you pay.

Preview 20 rows free

10,000 rows of yours: $12.99One-time. No subscription. All prices

This dataset200 rows25 columns
Yours10,000 rows25 columnsstore_city: UK only

blueprint · pharmacy-retail-purchase-events

Behind this dataset

Same schema. As many rows as you need.

These 200 rows came out of a blueprint — 25 columns with generation rules behind each one. Open it in Data Factory to retune a column, add your own, wire in foreign keys, and run it at the size you actually need.

Rules it was built with
  • Each transaction includes product, quantity, timestamp.
  • Customer segment and loyalty program flagged.
  • Prescription status and co-payment included.
  • Store location anonymized.
Rows
Open the blueprint in Data Factory

1 credit per row. New accounts start with 25 free credits.

Exports
CSV, JSON, JSONL, Parquet, SQL, Excel, TSV, XML
Licence
yours to use, including commercially
API slug
pharmacy-retail-purchase-events

What should your data show?

Preview 20 rows free
No signup. No card.