{
  "format": "dataset-manifest/1",
  "slug": "pharmacy-sample-database",
  "version": 1,
  "seed": "flagship:pharmacy-sample-database:1k",
  "engine": 2,
  "engineVersion": "1.0.0",
  "spec": {
    "format": "dataset/1",
    "engine": 2,
    "slug": "pharmacy-sample-database",
    "name": "Pharmacy sample database",
    "tagline": "Medicines, stock, prescriptions and sales across a chain, with coupons, insurance claims, returns and deliveries.",
    "description": "A pharmacy chain over five years: branches stock medicines from manufacturers and suppliers, doctors write prescriptions, and customers buy at the till. Every sale line is its quantity times the medicine price, every sale total is the sum of its lines, a coupon takes money off but never more than the total, 8% tax goes on what is left, and the payment is that amount to the cent. Insurance claims are for the sale they name and are never approved for more than was claimed, returns refund their lines, and a delivery has an arrival time only once it has arrived. A sale with no lines is a voided transaction, at zero.",
    "domain": "pharmacy",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "bi-dashboards",
      "test-fixtures"
    ],
    "keywords": [
      "pharmacy",
      "prescriptions",
      "medicines",
      "retail sales",
      "sample database"
    ],
    "locale": "en_US",
    "license": "CC0-1.0",
    "version": 1,
    "seed": "flagship:pharmacy-sample-database",
    "tables": {
      "active_ingredients": {
        "description": "Rows for the active_ingredients table.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Small molecule",
              "Biologic",
              "Vitamin or mineral",
              "Hormone"
            ],
            "weights": [
              70,
              8,
              14,
              8
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "Amoxicillin",
              "Ibuprofen",
              "Paracetamol",
              "Metformin",
              "Atorvastatin",
              "Omeprazole",
              "Lisinopril",
              "Amlodipine",
              "Simvastatin",
              "Levothyroxine",
              "Metoprolol",
              "Losartan",
              "Azithromycin",
              "Cetirizine",
              "Loratadine",
              "Prednisone",
              "Sertraline",
              "Fluoxetine",
              "Gabapentin",
              "Hydrochlorothiazide",
              "Pantoprazole",
              "Montelukast",
              "Salbutamol",
              "Insulin Glargine",
              "Clopidogrel",
              "Warfarin",
              "Furosemide",
              "Ciprofloxacin",
              "Doxycycline",
              "Naproxen",
              "Diclofenac",
              "Esomeprazole",
              "Rosuvastatin",
              "Escitalopram",
              "Bupropion",
              "Tamsulosin",
              "Finasteride",
              "Allopurinol",
              "Ondansetron",
              "Loperamide",
              "Famotidine",
              "Cholecalciferol",
              "Folic Acid",
              "Ferrous Sulfate",
              "Melatonin",
              "Zinc Sulfate",
              "Hydrocortisone",
              "Clotrimazole",
              "Fluticasone",
              "Budesonide"
            ],
            "unique": true
          }
        }
      },
      "branches": {
        "description": "Rows for the branches table.",
        "rows": 15,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "email": {
            "kind": "internet.email"
          },
          "name": {
            "kind": "place.city"
          },
          "phone": {
            "kind": "place.phone"
          }
        }
      },
      "coupon_usages": {
        "description": "Rows for the coupon_usages table.",
        "rows": 30,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "coupon_id": {
            "kind": "fk",
            "ref": "coupons.id",
            "skew": "long-tail"
          },
          "discount_applied": {
            "kind": "decimal",
            "min": 1,
            "max": 12,
            "scale": 2
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "unique": true
          }
        }
      },
      "coupons": {
        "description": "Rows for the coupons table.",
        "rows": 60,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "code": {
            "kind": "pattern",
            "pattern": "[SAVE]-AA##",
            "unique": true
          },
          "discount_percentage": {
            "kind": "decimal",
            "min": 5,
            "max": 30,
            "scale": 2
          },
          "expiry_date": {
            "kind": "date",
            "from": "2021-03-01",
            "to": "2026-06-30"
          },
          "is_active": {
            "kind": "bool"
          },
          "max_discount": {
            "kind": "decimal",
            "min": 5,
            "max": 40,
            "scale": 2
          }
        }
      },
      "customer_loyalty": {
        "description": "Rows for the customer_loyalty table.",
        "rows": 20,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "unique": true
          },
          "last_updated": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2025-12-31"
          },
          "points_balance": {
            "kind": "int",
            "min": 0,
            "max": 20000,
            "distribution": "long-tail"
          },
          "tier": {
            "kind": "enum",
            "values": [
              "bronze",
              "silver",
              "gold",
              "platinum"
            ],
            "weights": [
              55,
              28,
              13,
              4
            ]
          }
        }
      },
      "customers": {
        "description": "Rows for the customers table.",
        "rows": 60,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "date_of_birth": {
            "kind": "date",
            "from": "1935-01-01",
            "to": "2006-12-31"
          },
          "email": {
            "kind": "internet.email",
            "from": {
              "firstName": "first_name",
              "lastName": "last_name"
            }
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "gender": {
            "kind": "enum",
            "values": [
              "female",
              "male",
              "unspecified"
            ],
            "weights": [
              52,
              45,
              3
            ]
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "phone": {
            "kind": "phone.number"
          }
        }
      },
      "delivery_details": {
        "description": "Rows for the delivery_details table.",
        "rows": 40,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "actual_delivery": {
            "kind": "datetime",
            "after": "estimated_delivery",
            "withinSeconds": 86400,
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "delivered"
              ]
            }
          },
          "delivery_address": {
            "kind": "location.streetAddress"
          },
          "estimated_delivery": {
            "kind": "datetime",
            "after": "sale_id.sale_date",
            "withinDays": 2,
            "dayProfile": "business"
          },
          "recipient_name": {
            "kind": "person.fullName"
          },
          "recipient_phone": {
            "kind": "phone.number"
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "unique": true
          },
          "status": {
            "kind": "enum",
            "values": [
              "delivered",
              "out_for_delivery",
              "failed",
              "cancelled"
            ],
            "weights": [
              86,
              4,
              6,
              4
            ]
          }
        }
      },
      "doctors": {
        "description": "Rows for the doctors table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "email": {
            "kind": "internet.email",
            "from": {
              "firstName": "first_name",
              "lastName": "last_name"
            }
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "license_number": {
            "kind": "pattern",
            "pattern": "[MD]-######",
            "unique": true
          },
          "phone": {
            "kind": "phone.number"
          },
          "specialty": {
            "kind": "enum",
            "values": [
              "general_practice",
              "internal_medicine",
              "pediatrics",
              "cardiology",
              "dermatology",
              "psychiatry",
              "endocrinology",
              "orthopedics"
            ],
            "weights": [
              45,
              15,
              12,
              7,
              6,
              6,
              5,
              4
            ]
          }
        }
      },
      "dosage_forms": {
        "description": "Rows for the dosage_forms table.",
        "rows": 8,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Taken by mouth",
              "Applied to the skin",
              "Given by a clinician",
              "Inhaled",
              "Used in the eye or ear"
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "tablet",
              "capsule",
              "syrup",
              "cream",
              "injection",
              "inhaler",
              "drops",
              "patch"
            ],
            "unique": true
          }
        }
      },
      "employees": {
        "description": "Rows for the employees table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "hire_date": {
            "kind": "date",
            "from": "2010-01-01",
            "to": "2024-12-31"
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "license_number": {
            "kind": "pattern",
            "pattern": "[PH]-######",
            "unique": true
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "unique": true
          }
        }
      },
      "insurance_claims": {
        "description": "Rows for the insurance_claims table.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "approved_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 282,
            "scale": 2,
            "distribution": "long-tail",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "approved",
                "partially_approved"
              ]
            }
          },
          "claim_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 673,
            "scale": 2,
            "distribution": "long-tail"
          },
          "insurance_provider_id": {
            "kind": "fk",
            "ref": "insurance_providers.id",
            "skew": "long-tail"
          },
          "policy_number": {
            "kind": "pattern",
            "pattern": "[POL]-#########"
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "unique": true
          },
          "status": {
            "kind": "enum",
            "values": [
              "approved",
              "partially_approved",
              "denied",
              "pending"
            ],
            "weights": [
              62,
              18,
              12,
              8
            ]
          },
          "submission_date": {
            "kind": "date",
            "after": "sale_id.sale_date",
            "withinDays": 5
          }
        }
      },
      "insurance_providers": {
        "description": "Rows for the insurance_providers table.",
        "rows": 8,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "contact_person": {
            "kind": "person.fullName"
          },
          "email": {
            "kind": "internet.email"
          },
          "name": {
            "kind": "company.name"
          },
          "phone": {
            "kind": "phone.number"
          }
        }
      },
      "inventory_stocks": {
        "description": "Rows for the inventory_stocks table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "batch_number": {
            "kind": "pattern",
            "pattern": "[LOT]-AA####"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "expiry_date": {
            "kind": "date",
            "from": "2026-01-01",
            "to": "2029-12-31"
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "quantity": {
            "kind": "int",
            "min": 0,
            "max": 400,
            "distribution": "long-tail"
          },
          "shelf_id": {
            "kind": "fk",
            "ref": "shelves.id",
            "skew": "long-tail"
          }
        }
      },
      "manufacturers": {
        "description": "Rows for the manufacturers table.",
        "rows": 30,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "contact_person": {
            "kind": "person.fullName"
          },
          "email": {
            "kind": "internet.email"
          },
          "name": {
            "kind": "company.name"
          },
          "phone": {
            "kind": "phone.number"
          }
        }
      },
      "medicine_categories": {
        "description": "Rows for the medicine_categories table.",
        "rows": 12,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Prescription only",
              "Over the counter",
              "Mixed: some lines need a prescription"
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "analgesics",
              "antibiotics",
              "antihistamines",
              "antihypertensives",
              "antidepressants",
              "antidiabetics",
              "cardiovascular",
              "gastrointestinal",
              "respiratory",
              "dermatology",
              "vitamins_and_supplements",
              "hormones"
            ],
            "unique": true
          }
        }
      },
      "medicine_ingredients": {
        "description": "Rows for the medicine_ingredients table.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "active_ingredients.id",
            "skew": "long-tail"
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "strength": {
            "kind": "enum",
            "values": [
              "5 mg",
              "10 mg",
              "20 mg",
              "50 mg",
              "100 mg",
              "250 mg",
              "500 mg"
            ]
          }
        }
      },
      "medicines": {
        "description": "Rows for the medicines table.",
        "rows": 240,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "category_id": {
            "kind": "fk",
            "ref": "medicine_categories.id",
            "skew": "long-tail"
          },
          "dosage_form_id": {
            "kind": "fk",
            "ref": "dosage_forms.id",
            "skew": "long-tail"
          },
          "manufacturer_id": {
            "kind": "fk",
            "ref": "manufacturers.id",
            "skew": "long-tail"
          },
          "name": {
            "kind": "enum",
            "values": [
              "Amoxicillin",
              "Ibuprofen",
              "Paracetamol",
              "Metformin",
              "Atorvastatin",
              "Omeprazole",
              "Lisinopril",
              "Amlodipine",
              "Simvastatin",
              "Levothyroxine",
              "Metoprolol",
              "Losartan",
              "Azithromycin",
              "Cetirizine",
              "Loratadine",
              "Prednisone",
              "Sertraline",
              "Fluoxetine",
              "Gabapentin",
              "Hydrochlorothiazide",
              "Pantoprazole",
              "Montelukast",
              "Salbutamol",
              "Insulin Glargine",
              "Clopidogrel",
              "Warfarin",
              "Furosemide",
              "Ciprofloxacin",
              "Doxycycline",
              "Naproxen",
              "Diclofenac",
              "Esomeprazole",
              "Rosuvastatin",
              "Escitalopram",
              "Bupropion",
              "Tamsulosin",
              "Finasteride",
              "Allopurinol",
              "Ondansetron",
              "Loperamide",
              "Famotidine",
              "Cholecalciferol",
              "Folic Acid",
              "Ferrous Sulfate",
              "Melatonin",
              "Zinc Sulfate",
              "Hydrocortisone",
              "Clotrimazole",
              "Fluticasone",
              "Budesonide"
            ]
          },
          "packaging_type_id": {
            "kind": "fk",
            "ref": "packaging_types.id",
            "skew": "long-tail"
          },
          "price": {
            "kind": "decimal",
            "min": 2,
            "max": 95,
            "scale": 2,
            "distribution": "long-tail"
          },
          "requires_prescription": {
            "kind": "bool",
            "trueRate": 0.6
          },
          "scientific_name": {
            "kind": "copy",
            "from": "name"
          },
          "sku": {
            "kind": "pattern",
            "pattern": "[MED]-#####",
            "unique": true
          },
          "strength": {
            "kind": "enum",
            "values": [
              "5 mg",
              "10 mg",
              "20 mg",
              "40 mg",
              "100 mg",
              "250 mg",
              "500 mg",
              "1 g",
              "5 mg/ml",
              "1%"
            ]
          }
        }
      },
      "packaging_types": {
        "description": "Rows for the packaging_types table.",
        "rows": 6,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Child-resistant",
              "Tamper-evident seal",
              "Keep refrigerated",
              "Single use"
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "blister_pack",
              "bottle",
              "tube",
              "vial",
              "box",
              "sachet"
            ],
            "unique": true
          }
        }
      },
      "payment_methods": {
        "description": "Rows for the payment_methods table.",
        "rows": 5,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Settled at the till",
              "Settled by the insurer",
              "Prepaid"
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "card",
              "cash",
              "mobile_wallet",
              "insurance_direct",
              "gift_card"
            ],
            "unique": true
          }
        }
      },
      "payments": {
        "description": "Rows for the payments table.",
        "rows": 290,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "amount": {
            "kind": "decimal",
            "min": 0,
            "max": 845,
            "scale": 2,
            "distribution": "long-tail"
          },
          "payment_date": {
            "kind": "datetime",
            "after": "sale_id.sale_date",
            "withinSeconds": 300
          },
          "payment_method_id": {
            "kind": "fk",
            "ref": "payment_methods.id",
            "skew": "long-tail"
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "unique": true
          },
          "transaction_reference": {
            "kind": "pattern",
            "pattern": "[TXN]-############",
            "unique": true
          }
        }
      },
      "prescription_items": {
        "description": "Rows for the prescription_items table.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "dispensed_quantity": {
            "kind": "int",
            "min": 0,
            "max": 82,
            "distribution": "long-tail"
          },
          "dosage_instruction": {
            "kind": "enum",
            "values": [
              "One tablet daily",
              "One tablet twice daily",
              "One tablet three times daily",
              "Two tablets at night",
              "Apply thinly twice daily",
              "Two puffs when needed",
              "5 ml every eight hours",
              "As directed"
            ]
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "prescribed_quantity": {
            "kind": "int",
            "min": 1,
            "max": 90,
            "distribution": "long-tail"
          },
          "prescription_id": {
            "kind": "fk",
            "ref": "prescriptions.id",
            "skew": "long-tail"
          }
        }
      },
      "prescriptions": {
        "description": "Rows for the prescriptions table.",
        "rows": 80,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "doctor_id": {
            "kind": "fk",
            "ref": "doctors.id",
            "skew": "long-tail"
          },
          "expiry_date": {
            "kind": "date",
            "after": "issue_date",
            "withinDays": 365
          },
          "issue_date": {
            "kind": "date",
            "from": "2021-01-01",
            "to": "2025-12-31",
            "trend": "growing"
          },
          "status": {
            "kind": "enum",
            "values": [
              "dispensed",
              "partially_dispensed",
              "expired",
              "cancelled"
            ],
            "weights": [
              78,
              8,
              10,
              4
            ]
          }
        }
      },
      "purchase_order_items": {
        "description": "Rows for the purchase_order_items table.",
        "rows": 15,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "purchase_order_id": {
            "kind": "fk",
            "ref": "purchase_orders.id",
            "skew": "long-tail"
          },
          "quantity_ordered": {
            "kind": "int",
            "min": 10,
            "max": 500,
            "distribution": "long-tail"
          },
          "quantity_received": {
            "kind": "int",
            "min": 0,
            "max": 487,
            "distribution": "high"
          },
          "unit_cost": {
            "kind": "decimal",
            "min": 1,
            "max": 120,
            "scale": 2,
            "distribution": "long-tail"
          }
        }
      },
      "purchase_orders": {
        "description": "Rows for the purchase_orders table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "delivery_date": {
            "kind": "date",
            "after": "order_date",
            "withinDays": 10
          },
          "order_date": {
            "kind": "date",
            "from": "2021-01-01",
            "to": "2025-12-31"
          },
          "status": {
            "kind": "enum",
            "values": [
              "received",
              "partially_received",
              "ordered",
              "cancelled"
            ],
            "weights": [
              82,
              6,
              8,
              4
            ]
          },
          "supplier_id": {
            "kind": "fk",
            "ref": "suppliers.id",
            "skew": "long-tail"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 1,
            "max": 10000,
            "scale": 2,
            "distribution": "long-tail"
          }
        }
      },
      "return_items": {
        "description": "Rows for the return_items table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "quantity": {
            "kind": "int",
            "min": 1,
            "max": 3
          },
          "refund_amount": {
            "kind": "expr",
            "op": "product",
            "of": [
              "quantity",
              "medicine_id.price"
            ],
            "scale": 2
          },
          "return_id": {
            "kind": "fk",
            "ref": "returns.id",
            "skew": "long-tail"
          }
        }
      },
      "returns": {
        "description": "Rows for the returns table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "reason": {
            "kind": "enum",
            "values": [
              "Wrong medicine dispensed",
              "Customer changed their mind",
              "Packaging damaged",
              "Prescription changed by the doctor",
              "Allergic reaction reported"
            ],
            "weights": [
              15,
              35,
              20,
              20,
              10
            ]
          },
          "return_date": {
            "kind": "datetime",
            "after": "sale_id.sale_date",
            "withinDays": 14,
            "dayProfile": "business"
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "unique": true
          },
          "total_refund_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 10000,
            "scale": 2,
            "distribution": "long-tail"
          }
        }
      },
      "roles": {
        "description": "Rows for the roles table.",
        "rows": 6,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "enum",
            "values": [
              "Dispenses prescriptions",
              "Works the till",
              "Orders stock",
              "Runs a branch",
              "Manages the system"
            ]
          },
          "name": {
            "kind": "enum",
            "values": [
              "pharmacist",
              "technician",
              "cashier",
              "branch_manager",
              "buyer",
              "admin"
            ],
            "unique": true
          }
        }
      },
      "sale_items": {
        "description": "Rows for the sale_items table.",
        "rows": 1000,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "discount_amount": {
            "kind": "constant",
            "value": 0
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "skew": "long-tail"
          },
          "quantity": {
            "kind": "int",
            "min": 1,
            "max": 3,
            "distribution": "long-tail"
          },
          "sale_id": {
            "kind": "fk",
            "ref": "sales.id",
            "skew": "flat"
          },
          "total_price": {
            "kind": "expr",
            "op": "product",
            "of": [
              "quantity",
              "unit_price"
            ],
            "scale": 2
          },
          "unit_price": {
            "kind": "copy",
            "from": "medicine_id.price"
          }
        }
      },
      "sales": {
        "description": "Rows for the sales table.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "discount_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 12,
            "scale": 2,
            "distribution": "long-tail"
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "net_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 845,
            "scale": 2
          },
          "sale_date": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2025-12-31",
            "trend": "growing",
            "dayProfile": "business"
          },
          "tax_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 63,
            "scale": 2,
            "distribution": "long-tail"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 10000,
            "scale": 2,
            "distribution": "long-tail"
          }
        }
      },
      "shelves": {
        "description": "Rows for the shelves table.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "code": {
            "kind": "pattern",
            "pattern": "[SH]-###"
          },
          "location_description": {
            "kind": "enum",
            "values": [
              "Behind the counter",
              "Front of store",
              "Cold storage",
              "Controlled drugs cabinet",
              "Back room",
              "Self-service aisle"
            ],
            "weights": [
              30,
              20,
              10,
              5,
              20,
              15
            ]
          }
        }
      },
      "shifts": {
        "description": "Rows for the shifts table.",
        "rows": 12,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "cash_float_end": {
            "kind": "decimal",
            "min": 100,
            "max": 4000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "cash_float_start": {
            "kind": "decimal",
            "min": 100,
            "max": 300,
            "scale": 2
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "end_time": {
            "kind": "datetime",
            "after": "start_time",
            "withinSeconds": 36000
          },
          "start_time": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2025-12-31",
            "dayProfile": "business"
          },
          "status": {
            "kind": "enum",
            "values": [
              "closed",
              "open",
              "reconciled"
            ],
            "weights": [
              30,
              2,
              68
            ]
          }
        }
      },
      "stock_adjustments": {
        "description": "Rows for the stock_adjustments table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "adjustment_date": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2025-12-31",
            "dayProfile": "business"
          },
          "adjustment_type": {
            "kind": "enum",
            "values": [
              "count_correction",
              "damaged",
              "expired",
              "transfer_in",
              "transfer_out",
              "recall"
            ],
            "weights": [
              40,
              15,
              20,
              10,
              10,
              5
            ]
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "inventory_stock_id": {
            "kind": "fk",
            "ref": "inventory_stocks.id",
            "skew": "long-tail"
          },
          "quantity_adjusted": {
            "kind": "int",
            "min": 1,
            "max": 120,
            "distribution": "long-tail"
          },
          "reason": {
            "kind": "enum",
            "values": [
              "Shelf count did not match the system",
              "Box crushed in delivery",
              "Past its expiry date",
              "Moved between branches",
              "Withdrawn by the manufacturer"
            ]
          }
        }
      },
      "supplier_invoices": {
        "description": "Rows for the supplier_invoices table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "due_date": {
            "kind": "date",
            "after": "invoice_date",
            "withinDays": 45
          },
          "invoice_date": {
            "kind": "date",
            "after": "purchase_order_id.order_date",
            "withinDays": 15
          },
          "invoice_number": {
            "kind": "pattern",
            "pattern": "[INV]-########",
            "unique": true
          },
          "paid_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 9671,
            "scale": 2,
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "paid"
              ]
            }
          },
          "purchase_order_id": {
            "kind": "fk",
            "ref": "purchase_orders.id",
            "unique": true
          },
          "status": {
            "kind": "enum",
            "values": [
              "paid",
              "unpaid",
              "overdue"
            ],
            "weights": [
              80,
              14,
              6
            ]
          },
          "total_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 9671,
            "scale": 2,
            "distribution": "long-tail"
          }
        }
      },
      "suppliers": {
        "description": "Rows for the suppliers table.",
        "rows": 25,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "contact_name": {
            "kind": "person.fullName"
          },
          "email": {
            "kind": "internet.email"
          },
          "name": {
            "kind": "company.name"
          },
          "phone": {
            "kind": "phone.number"
          }
        }
      },
      "user_roles": {
        "description": "Rows for the user_roles table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "role_id": {
            "kind": "fk",
            "ref": "roles.id",
            "skew": "long-tail"
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "skew": "long-tail"
          }
        }
      },
      "users": {
        "description": "Rows for the users table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "email": {
            "kind": "internet.email",
            "unique": true
          },
          "is_active": {
            "kind": "bool",
            "trueRate": 0.9
          },
          "password_hash": {
            "kind": "pattern",
            "pattern": "[$2b$12$]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "username": {
            "kind": "internet.username",
            "unique": true
          }
        }
      }
    }
  },
  "counts": {
    "active_ingredients": 50,
    "branches": 15,
    "coupons": 60,
    "customers": 60,
    "customer_loyalty": 20,
    "doctors": 10,
    "dosage_forms": 8,
    "insurance_providers": 8,
    "manufacturers": 30,
    "medicine_categories": 12,
    "packaging_types": 6,
    "medicines": 240,
    "medicine_ingredients": 300,
    "payment_methods": 5,
    "prescriptions": 80,
    "prescription_items": 150,
    "roles": 6,
    "shelves": 150,
    "inventory_stocks": 10,
    "suppliers": 25,
    "purchase_orders": 10,
    "purchase_order_items": 15,
    "supplier_invoices": 10,
    "users": 10,
    "employees": 10,
    "sales": 300,
    "coupon_usages": 30,
    "delivery_details": 40,
    "insurance_claims": 50,
    "payments": 290,
    "returns": 10,
    "return_items": 10,
    "sale_items": 1000,
    "shifts": 12,
    "stock_adjustments": 10,
    "user_roles": 10
  },
  "artifacts": [
    {
      "file": "csv/active_ingredients.csv",
      "format": "csv",
      "table": "active_ingredients",
      "key": "datasets/pharmacy-sample-database/v1/csv/active_ingredients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/active_ingredients.csv",
      "bytes": 1554,
      "sha256": "387517b46cc8f1bf76a5ccd0b10d0d932329b484290f61331ac77492be5b157a",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/branches.csv",
      "format": "csv",
      "table": "branches",
      "key": "datasets/pharmacy-sample-database/v1/csv/branches.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/branches.csv",
      "bytes": 1130,
      "sha256": "fe14611351717ed3ed06936f158ad916db584587ee27fbf9f56ff38077d21199",
      "rows": 15,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/coupons.csv",
      "format": "csv",
      "table": "coupons",
      "key": "datasets/pharmacy-sample-database/v1/csv/coupons.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/coupons.csv",
      "bytes": 2581,
      "sha256": "04f6121983659e852af3a8ae3e923a873056c237af49d01212af44e83c5e4ff0",
      "rows": 60,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/pharmacy-sample-database/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/customers.csv",
      "bytes": 5920,
      "sha256": "214e52e654b9fbe95a2bf4eebb3d085ff7713df89183176e78c8a92bb11ea522",
      "rows": 60,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customer_loyalty.csv",
      "format": "csv",
      "table": "customer_loyalty",
      "key": "datasets/pharmacy-sample-database/v1/csv/customer_loyalty.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/customer_loyalty.csv",
      "bytes": 826,
      "sha256": "f35d0d15d70a57c4c5f2e2e7b01eadacf05451df8b2682a7602c37c23d678eb9",
      "rows": 20,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/doctors.csv",
      "format": "csv",
      "table": "doctors",
      "key": "datasets/pharmacy-sample-database/v1/csv/doctors.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/doctors.csv",
      "bytes": 894,
      "sha256": "0a6ee8fd469ad1d4003d63d53ad46c554fb46ca3d07ca6a7d6b2f018f02f699c",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/dosage_forms.csv",
      "format": "csv",
      "table": "dosage_forms",
      "key": "datasets/pharmacy-sample-database/v1/csv/dosage_forms.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/dosage_forms.csv",
      "bytes": 253,
      "sha256": "da7b8005810c63d4a50773c75abb4a9acad0cf2e056e0dd04d2d1114314a3893",
      "rows": 8,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/insurance_providers.csv",
      "format": "csv",
      "table": "insurance_providers",
      "key": "datasets/pharmacy-sample-database/v1/csv/insurance_providers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/insurance_providers.csv",
      "bytes": 880,
      "sha256": "ad5e182d957b68a32ff11bdfea699e1ad9d02770d36842386ac86fd9ae8bd75d",
      "rows": 8,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/manufacturers.csv",
      "format": "csv",
      "table": "manufacturers",
      "key": "datasets/pharmacy-sample-database/v1/csv/manufacturers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/manufacturers.csv",
      "bytes": 3096,
      "sha256": "a257ca03d6d84bce9776cd9e5463e099e8fb374da2fb04cb06c6cf2687184c5d",
      "rows": 30,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/medicine_categories.csv",
      "format": "csv",
      "table": "medicine_categories",
      "key": "datasets/pharmacy-sample-database/v1/csv/medicine_categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/medicine_categories.csv",
      "bytes": 465,
      "sha256": "0dc78509cb8bf33f9d12d93dac37f530379e1715577d1cdf359e0e6c40ca1a05",
      "rows": 12,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/packaging_types.csv",
      "format": "csv",
      "table": "packaging_types",
      "key": "datasets/pharmacy-sample-database/v1/csv/packaging_types.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/packaging_types.csv",
      "bytes": 192,
      "sha256": "ee99cd7e4059fa8d217840c645aa7b1352d52dccfc1a15fcbe7a807caf5b3f1d",
      "rows": 6,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/medicines.csv",
      "format": "csv",
      "table": "medicines",
      "key": "datasets/pharmacy-sample-database/v1/csv/medicines.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/medicines.csv",
      "bytes": 15442,
      "sha256": "88455d2dee3d813725b7a60e1c25b3b7da842acf66582d7ec3a5be62a2463012",
      "rows": 240,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/medicine_ingredients.csv",
      "format": "csv",
      "table": "medicine_ingredients",
      "key": "datasets/pharmacy-sample-database/v1/csv/medicine_ingredients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/medicine_ingredients.csv",
      "bytes": 5032,
      "sha256": "f54c8ed50983021e0e2f3a6bc50ef69671df02c6ad88892ceb529528a2778b62",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payment_methods.csv",
      "format": "csv",
      "table": "payment_methods",
      "key": "datasets/pharmacy-sample-database/v1/csv/payment_methods.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/payment_methods.csv",
      "bytes": 172,
      "sha256": "305f4097f9a7265423d7f3658db31f0af0b28c94dfac4fede932f1f106b1d6fa",
      "rows": 5,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/prescriptions.csv",
      "format": "csv",
      "table": "prescriptions",
      "key": "datasets/pharmacy-sample-database/v1/csv/prescriptions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/prescriptions.csv",
      "bytes": 3339,
      "sha256": "44402814245c1b5b11dcd8517957f87e6df21eb7414b18d86abceb8dd0a1c619",
      "rows": 80,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/prescription_items.csv",
      "format": "csv",
      "table": "prescription_items",
      "key": "datasets/pharmacy-sample-database/v1/csv/prescription_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/prescription_items.csv",
      "bytes": 5615,
      "sha256": "46164d9738b2ccd3ad5d57aa4b0eec08e2ab36b6481644dd8df233865c887318",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/roles.csv",
      "format": "csv",
      "table": "roles",
      "key": "datasets/pharmacy-sample-database/v1/csv/roles.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/roles.csv",
      "bytes": 191,
      "sha256": "d570154e00dc5a9cf73ee8dc594865df24faa98531a046f2f825fe75f35b59ed",
      "rows": 6,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shelves.csv",
      "format": "csv",
      "table": "shelves",
      "key": "datasets/pharmacy-sample-database/v1/csv/shelves.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/shelves.csv",
      "bytes": 4452,
      "sha256": "cb5a7fa2ba09b192a70291fa2dc5c4889e18af0b0a177733d39f3598b959ae79",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/inventory_stocks.csv",
      "format": "csv",
      "table": "inventory_stocks",
      "key": "datasets/pharmacy-sample-database/v1/csv/inventory_stocks.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/inventory_stocks.csv",
      "bytes": 437,
      "sha256": "996eb4d17d4ca9eca5d48f9c8cd4086ff162cc3f9771197352273804e75caeed",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/suppliers.csv",
      "format": "csv",
      "table": "suppliers",
      "key": "datasets/pharmacy-sample-database/v1/csv/suppliers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/suppliers.csv",
      "bytes": 2589,
      "sha256": "e0295c017f575d0a13295917961220ac0af0f93049b4857150b6f0a6ba37f2b7",
      "rows": 25,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/purchase_orders.csv",
      "format": "csv",
      "table": "purchase_orders",
      "key": "datasets/pharmacy-sample-database/v1/csv/purchase_orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/purchase_orders.csv",
      "bytes": 534,
      "sha256": "eb18716b0f6f8c5c3601dcd4932a0bc17e41f6a3efc08d210c94570e215356de",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/purchase_order_items.csv",
      "format": "csv",
      "table": "purchase_order_items",
      "key": "datasets/pharmacy-sample-database/v1/csv/purchase_order_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/purchase_order_items.csv",
      "bytes": 401,
      "sha256": "c0bbb376ddc682c77c4d771a9831bcea539808c5458378131487793944a23280",
      "rows": 15,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/supplier_invoices.csv",
      "format": "csv",
      "table": "supplier_invoices",
      "key": "datasets/pharmacy-sample-database/v1/csv/supplier_invoices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/supplier_invoices.csv",
      "bytes": 685,
      "sha256": "1d5b6dc80d5d61b0fad5ed0acb14a1560169c2a6eeddb158b3ad1034ac5be2d0",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/pharmacy-sample-database/v1/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/users.csv",
      "bytes": 1183,
      "sha256": "c50093e37c02b0530c9c5505e98f2cc0548be9bd9fc730295c1e70763ed12521",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/employees.csv",
      "format": "csv",
      "table": "employees",
      "key": "datasets/pharmacy-sample-database/v1/csv/employees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/employees.csv",
      "bytes": 514,
      "sha256": "289f39522af9487e39bc304bd3f2f9100dbd637b06f450254eb6c1ac4b6dce80",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sales.csv",
      "format": "csv",
      "table": "sales",
      "key": "datasets/pharmacy-sample-database/v1/csv/sales.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/sales.csv",
      "bytes": 15565,
      "sha256": "f95e15b4b63122b0459a2ed648a5ea0ade54f01c2184971dff90cbec1388109f",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/coupon_usages.csv",
      "format": "csv",
      "table": "coupon_usages",
      "key": "datasets/pharmacy-sample-database/v1/csv/coupon_usages.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/coupon_usages.csv",
      "bytes": 483,
      "sha256": "4951b95311f08b8d8adb85135a39db2d3f313be6e327a22309af8dbd83926c0c",
      "rows": 30,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/delivery_details.csv",
      "format": "csv",
      "table": "delivery_details",
      "key": "datasets/pharmacy-sample-database/v1/csv/delivery_details.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/delivery_details.csv",
      "bytes": 4254,
      "sha256": "327c36f2a7818239acbe1832b6c8e23b0704570adaf2df5d0b978a41804365b3",
      "rows": 40,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/insurance_claims.csv",
      "format": "csv",
      "table": "insurance_claims",
      "key": "datasets/pharmacy-sample-database/v1/csv/insurance_claims.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/insurance_claims.csv",
      "bytes": 2906,
      "sha256": "c537e767b665b059ff882d2a94f8f61bdac36276dacf3c846d474002badfee7e",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payments.csv",
      "format": "csv",
      "table": "payments",
      "key": "datasets/pharmacy-sample-database/v1/csv/payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/payments.csv",
      "bytes": 15611,
      "sha256": "7b9f28a27c9d714d1e1e0edb2cdbb7c2fbc8e36b35c6ed2802d6e5f89e3dc592",
      "rows": 290,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/returns.csv",
      "format": "csv",
      "table": "returns",
      "key": "datasets/pharmacy-sample-database/v1/csv/returns.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/returns.csv",
      "bytes": 634,
      "sha256": "3a8f0c69e621c47576d62501623fd6d29c6eb45a29407a41d0b755aa5b86acc6",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/return_items.csv",
      "format": "csv",
      "table": "return_items",
      "key": "datasets/pharmacy-sample-database/v1/csv/return_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/return_items.csv",
      "bytes": 212,
      "sha256": "0a1f7f4ef8c74dc7ca9c433256a6c578a11881c9d9057acca9544047d7fef5cd",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sale_items.csv",
      "format": "csv",
      "table": "sale_items",
      "key": "datasets/pharmacy-sample-database/v1/csv/sale_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/sale_items.csv",
      "bytes": 27414,
      "sha256": "74c87b842948c0cc718fbdf67d12757b5fc52afe8b525006dd68354af5523db5",
      "rows": 1000,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shifts.csv",
      "format": "csv",
      "table": "shifts",
      "key": "datasets/pharmacy-sample-database/v1/csv/shifts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/shifts.csv",
      "bytes": 914,
      "sha256": "9e498a424130c34dc320d1f14e70bf6e6cccb8be1f097add0d47375e29cdff04",
      "rows": 12,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/stock_adjustments.csv",
      "format": "csv",
      "table": "stock_adjustments",
      "key": "datasets/pharmacy-sample-database/v1/csv/stock_adjustments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/stock_adjustments.csv",
      "bytes": 778,
      "sha256": "fbdcebcd758218d3a9253cad420beb5baa29dbe3f1b7bad468deb993aa4346aa",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/user_roles.csv",
      "format": "csv",
      "table": "user_roles",
      "key": "datasets/pharmacy-sample-database/v1/csv/user_roles.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/csv/user_roles.csv",
      "bytes": 92,
      "sha256": "eed6395f53fd6e6105999c891a96769920e90e4eac61fc41e01eedd647c2e4c7",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "pharmacy-sample-database.json",
      "format": "json",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/pharmacy-sample-database.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/pharmacy-sample-database.json",
      "bytes": 592069,
      "sha256": "3a6b393d53061d82be2c738d7ce3a1782b9e87df2310fbabd87ee48f5aabfc25",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/sql/postgres.sql",
      "bytes": 195227,
      "sha256": "dcaa12878c8a113d6b1f7641788e5324243ab8691dbc586fb453bb20aa564673",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/sql/mysql.sql",
      "bytes": 190629,
      "sha256": "294118492c49c2fdd74b6e5b2806cd40298f840e10597656e8a4ada06c6acaf9",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/sql/mssql.sql",
      "bytes": 197020,
      "sha256": "b7735791133f5f46ff49fc1ee6c18b883c9c2702a1b2ea79122f7a5c202efcab",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/sql/sqlite.sql",
      "bytes": 187486,
      "sha256": "da6d33b3726c231252bf7126046f113012dd7a27839353d545c6c42e3dcbeecd",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/prisma/seed.ts",
      "bytes": 456038,
      "sha256": "84199b5562ffd5f77451515afa584bee4b652b3c50ede44b76724d7abad4e1d3",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/pharmacy-sample-database/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/django/fixtures.json",
      "bytes": 721256,
      "sha256": "f945dbff18e98f7239324fdf399a4d19473f6e07bfe9686a0226ef4c2915b94f",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "flagship": {
    "sizes": {
      "1k": {
        "rows": 3062,
        "counts": {
          "active_ingredients": 50,
          "branches": 15,
          "coupons": 60,
          "customers": 60,
          "customer_loyalty": 20,
          "doctors": 10,
          "dosage_forms": 8,
          "insurance_providers": 8,
          "manufacturers": 30,
          "medicine_categories": 12,
          "packaging_types": 6,
          "medicines": 240,
          "medicine_ingredients": 300,
          "payment_methods": 5,
          "prescriptions": 80,
          "prescription_items": 150,
          "roles": 6,
          "shelves": 150,
          "inventory_stocks": 10,
          "suppliers": 25,
          "purchase_orders": 10,
          "purchase_order_items": 15,
          "supplier_invoices": 10,
          "users": 10,
          "employees": 10,
          "sales": 300,
          "coupon_usages": 30,
          "delivery_details": 40,
          "insurance_claims": 50,
          "payments": 290,
          "returns": 10,
          "return_items": 10,
          "sale_items": 1000,
          "shifts": 12,
          "stock_adjustments": 10,
          "user_roles": 10
        },
        "notes": [],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/1k/postgres.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1k/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/postgres.sql.gz",
            "bytes": 57282,
            "sha256": "c33ba311ad1c05b5498593deafa7aad273a3414fa88bdbc7ff23f60e0a9af8da",
            "raw": {
              "bytes": 202357,
              "sha256": "b6935d0b08adda1db780f1945d81166d7cedbcd329a77fe1168a89411114347f"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/1k/mysql.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1k/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/mysql.sql.gz",
            "bytes": 56563,
            "sha256": "c9cfa532947cc29833882f8cfb365d63876059fb30e97ebfc3f8fbbbd382d7e0",
            "raw": {
              "bytes": 197759,
              "sha256": "6f98c33d3a3d439c63a0adb6c3829dd19bd320eb707cc957d6f9a1a0ede1dae9"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/1k/sqlite.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1k/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/sqlite.sql.gz",
            "bytes": 55983,
            "sha256": "6fc06cb450b0900ed4cdb4a03c6410b8a8df40ea8a1e4bfb9cedbdac4690f24a",
            "raw": {
              "bytes": 194616,
              "sha256": "19887e64ed097bba317d488246327cea1c1d9d855da2e6abbe1653e7b94edd2e"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/1k/csv.zip",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1k/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/csv.zip",
            "bytes": 58899,
            "sha256": "40080a234270370371e80d9ee4af27863e65d6294e99f4753b705aa2799189cc",
            "tables": {
              "active_ingredients": {
                "bytes": 1554,
                "sha256": "387517b46cc8f1bf76a5ccd0b10d0d932329b484290f61331ac77492be5b157a"
              },
              "branches": {
                "bytes": 1130,
                "sha256": "fe14611351717ed3ed06936f158ad916db584587ee27fbf9f56ff38077d21199"
              },
              "coupon_usages": {
                "bytes": 483,
                "sha256": "4951b95311f08b8d8adb85135a39db2d3f313be6e327a22309af8dbd83926c0c"
              },
              "coupons": {
                "bytes": 2581,
                "sha256": "04f6121983659e852af3a8ae3e923a873056c237af49d01212af44e83c5e4ff0"
              },
              "customer_loyalty": {
                "bytes": 826,
                "sha256": "f35d0d15d70a57c4c5f2e2e7b01eadacf05451df8b2682a7602c37c23d678eb9"
              },
              "customers": {
                "bytes": 5920,
                "sha256": "214e52e654b9fbe95a2bf4eebb3d085ff7713df89183176e78c8a92bb11ea522"
              },
              "delivery_details": {
                "bytes": 4254,
                "sha256": "327c36f2a7818239acbe1832b6c8e23b0704570adaf2df5d0b978a41804365b3"
              },
              "doctors": {
                "bytes": 894,
                "sha256": "0a6ee8fd469ad1d4003d63d53ad46c554fb46ca3d07ca6a7d6b2f018f02f699c"
              },
              "dosage_forms": {
                "bytes": 253,
                "sha256": "da7b8005810c63d4a50773c75abb4a9acad0cf2e056e0dd04d2d1114314a3893"
              },
              "employees": {
                "bytes": 514,
                "sha256": "289f39522af9487e39bc304bd3f2f9100dbd637b06f450254eb6c1ac4b6dce80"
              },
              "insurance_claims": {
                "bytes": 2906,
                "sha256": "c537e767b665b059ff882d2a94f8f61bdac36276dacf3c846d474002badfee7e"
              },
              "insurance_providers": {
                "bytes": 880,
                "sha256": "ad5e182d957b68a32ff11bdfea699e1ad9d02770d36842386ac86fd9ae8bd75d"
              },
              "inventory_stocks": {
                "bytes": 437,
                "sha256": "996eb4d17d4ca9eca5d48f9c8cd4086ff162cc3f9771197352273804e75caeed"
              },
              "manufacturers": {
                "bytes": 3096,
                "sha256": "a257ca03d6d84bce9776cd9e5463e099e8fb374da2fb04cb06c6cf2687184c5d"
              },
              "medicine_categories": {
                "bytes": 465,
                "sha256": "0dc78509cb8bf33f9d12d93dac37f530379e1715577d1cdf359e0e6c40ca1a05"
              },
              "medicine_ingredients": {
                "bytes": 5032,
                "sha256": "f54c8ed50983021e0e2f3a6bc50ef69671df02c6ad88892ceb529528a2778b62"
              },
              "medicines": {
                "bytes": 15442,
                "sha256": "88455d2dee3d813725b7a60e1c25b3b7da842acf66582d7ec3a5be62a2463012"
              },
              "packaging_types": {
                "bytes": 192,
                "sha256": "ee99cd7e4059fa8d217840c645aa7b1352d52dccfc1a15fcbe7a807caf5b3f1d"
              },
              "payment_methods": {
                "bytes": 172,
                "sha256": "305f4097f9a7265423d7f3658db31f0af0b28c94dfac4fede932f1f106b1d6fa"
              },
              "payments": {
                "bytes": 15611,
                "sha256": "7b9f28a27c9d714d1e1e0edb2cdbb7c2fbc8e36b35c6ed2802d6e5f89e3dc592"
              },
              "prescription_items": {
                "bytes": 5615,
                "sha256": "46164d9738b2ccd3ad5d57aa4b0eec08e2ab36b6481644dd8df233865c887318"
              },
              "prescriptions": {
                "bytes": 3339,
                "sha256": "44402814245c1b5b11dcd8517957f87e6df21eb7414b18d86abceb8dd0a1c619"
              },
              "purchase_order_items": {
                "bytes": 401,
                "sha256": "c0bbb376ddc682c77c4d771a9831bcea539808c5458378131487793944a23280"
              },
              "purchase_orders": {
                "bytes": 534,
                "sha256": "eb18716b0f6f8c5c3601dcd4932a0bc17e41f6a3efc08d210c94570e215356de"
              },
              "return_items": {
                "bytes": 212,
                "sha256": "0a1f7f4ef8c74dc7ca9c433256a6c578a11881c9d9057acca9544047d7fef5cd"
              },
              "returns": {
                "bytes": 634,
                "sha256": "3a8f0c69e621c47576d62501623fd6d29c6eb45a29407a41d0b755aa5b86acc6"
              },
              "roles": {
                "bytes": 191,
                "sha256": "d570154e00dc5a9cf73ee8dc594865df24faa98531a046f2f825fe75f35b59ed"
              },
              "sale_items": {
                "bytes": 27414,
                "sha256": "74c87b842948c0cc718fbdf67d12757b5fc52afe8b525006dd68354af5523db5"
              },
              "sales": {
                "bytes": 15565,
                "sha256": "f95e15b4b63122b0459a2ed648a5ea0ade54f01c2184971dff90cbec1388109f"
              },
              "shelves": {
                "bytes": 4452,
                "sha256": "cb5a7fa2ba09b192a70291fa2dc5c4889e18af0b0a177733d39f3598b959ae79"
              },
              "shifts": {
                "bytes": 914,
                "sha256": "9e498a424130c34dc320d1f14e70bf6e6cccb8be1f097add0d47375e29cdff04"
              },
              "stock_adjustments": {
                "bytes": 778,
                "sha256": "fbdcebcd758218d3a9253cad420beb5baa29dbe3f1b7bad468deb993aa4346aa"
              },
              "supplier_invoices": {
                "bytes": 685,
                "sha256": "1d5b6dc80d5d61b0fad5ed0acb14a1560169c2a6eeddb158b3ad1034ac5be2d0"
              },
              "suppliers": {
                "bytes": 2589,
                "sha256": "e0295c017f575d0a13295917961220ac0af0f93049b4857150b6f0a6ba37f2b7"
              },
              "user_roles": {
                "bytes": 92,
                "sha256": "eed6395f53fd6e6105999c891a96769920e90e4eac61fc41e01eedd647c2e4c7"
              },
              "users": {
                "bytes": 1183,
                "sha256": "c50093e37c02b0530c9c5505e98f2cc0548be9bd9fc730295c1e70763ed12521"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every sale line is its quantity times the medicine price",
            "violations": 0
          },
          {
            "name": "Every sale total is the sum of its lines",
            "violations": 0
          },
          {
            "name": "A coupon discounts the sale, never by more than its total",
            "violations": 0
          },
          {
            "name": "Tax is 8% of the discounted total, and the net is that plus tax",
            "violations": 0
          },
          {
            "name": "Every payment is its sale’s net amount",
            "violations": 0
          },
          {
            "name": "A claim is for its sale, and never approved for more",
            "violations": 0
          },
          {
            "name": "A delivery has an arrival time exactly when it was delivered",
            "violations": 0
          },
          {
            "name": "Nothing is dispensed or received beyond what was asked for",
            "violations": 0
          },
          {
            "name": "A paid invoice is paid in full, an unpaid one not at all",
            "violations": 0
          }
        ],
        "dirty": {
          "report": {
            "rates": {
              "missing": 0.03,
              "typos": 0.03,
              "outliers": 0.005,
              "duplicates": 0.01
            },
            "tables": {
              "active_ingredients": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 2,
                    "typos": 3,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 2,
                    "typos": 4,
                    "outliers": 0
                  }
                }
              },
              "branches": {
                "duplicates": 0,
                "columns": {
                  "phone": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "coupons": {
                "duplicates": 5,
                "columns": {
                  "code": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "discount_percentage": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "is_active": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "customers": {
                "duplicates": 0,
                "columns": {
                  "address": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "date_of_birth": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 1,
                    "typos": 5,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "gender": {
                    "missing": 3,
                    "typos": 3,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 2,
                    "typos": 2,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "doctors": {
                "duplicates": 0,
                "columns": {
                  "last_name": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "specialty": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "dosage_forms": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "insurance_providers": {
                "duplicates": 0,
                "columns": {
                  "contact_person": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "manufacturers": {
                "duplicates": 0,
                "columns": {
                  "address": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "contact_person": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 2,
                    "typos": 2,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "medicine_categories": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "packaging_types": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "medicines": {
                "duplicates": 4,
                "columns": {
                  "name": {
                    "missing": 9,
                    "typos": 15,
                    "outliers": 0
                  },
                  "price": {
                    "missing": 5,
                    "typos": 0,
                    "outliers": 1
                  },
                  "requires_prescription": {
                    "missing": 7,
                    "typos": 0,
                    "outliers": 0
                  },
                  "scientific_name": {
                    "missing": 3,
                    "typos": 11,
                    "outliers": 0
                  },
                  "sku": {
                    "missing": 7,
                    "typos": 9,
                    "outliers": 0
                  },
                  "strength": {
                    "missing": 5,
                    "typos": 6,
                    "outliers": 0
                  }
                }
              },
              "medicine_ingredients": {
                "duplicates": 0,
                "columns": {
                  "strength": {
                    "missing": 7,
                    "typos": 8,
                    "outliers": 0
                  }
                }
              },
              "prescriptions": {
                "duplicates": 0,
                "columns": {
                  "issue_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 3,
                    "typos": 3,
                    "outliers": 0
                  }
                }
              },
              "prescription_items": {
                "duplicates": 1,
                "columns": {
                  "dispensed_quantity": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 4
                  },
                  "dosage_instruction": {
                    "missing": 4,
                    "typos": 2,
                    "outliers": 0
                  },
                  "prescribed_quantity": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 3
                  }
                }
              },
              "shelves": {
                "duplicates": 0,
                "columns": {
                  "code": {
                    "missing": 8,
                    "typos": 2,
                    "outliers": 0
                  },
                  "location_description": {
                    "missing": 3,
                    "typos": 4,
                    "outliers": 0
                  }
                }
              },
              "inventory_stocks": {
                "duplicates": 0,
                "columns": {
                  "batch_number": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "quantity": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "suppliers": {
                "duplicates": 1,
                "columns": {
                  "address": {
                    "missing": 1,
                    "typos": 2,
                    "outliers": 0
                  },
                  "contact_name": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "purchase_orders": {
                "duplicates": 0,
                "columns": {
                  "status": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "supplier_invoices": {
                "duplicates": 0,
                "columns": {
                  "invoice_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "total_amount": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "employees": {
                "duplicates": 0,
                "columns": {
                  "first_name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "hire_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "sales": {
                "duplicates": 2,
                "columns": {
                  "discount_amount": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 0
                  },
                  "net_amount": {
                    "missing": 9,
                    "typos": 0,
                    "outliers": 2
                  },
                  "sale_date": {
                    "missing": 8,
                    "typos": 0,
                    "outliers": 0
                  },
                  "tax_amount": {
                    "missing": 16,
                    "typos": 0,
                    "outliers": 2
                  },
                  "total_amount": {
                    "missing": 10,
                    "typos": 0,
                    "outliers": 3
                  }
                }
              },
              "delivery_details": {
                "duplicates": 1,
                "columns": {
                  "actual_delivery": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "delivery_address": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "estimated_delivery": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "recipient_name": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "recipient_phone": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 3,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "insurance_claims": {
                "duplicates": 0,
                "columns": {
                  "approved_amount": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 1
                  },
                  "claim_amount": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 0
                  },
                  "policy_number": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 1,
                    "typos": 3,
                    "outliers": 0
                  }
                }
              },
              "payments": {
                "duplicates": 5,
                "columns": {
                  "amount": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 2
                  },
                  "payment_date": {
                    "missing": 12,
                    "typos": 0,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 7,
                    "typos": 10,
                    "outliers": 0
                  }
                }
              },
              "returns": {
                "duplicates": 0,
                "columns": {
                  "return_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "return_items": {
                "duplicates": 0,
                "columns": {
                  "quantity": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "sale_items": {
                "duplicates": 14,
                "columns": {
                  "discount_amount": {
                    "missing": 37,
                    "typos": 0,
                    "outliers": 0
                  },
                  "quantity": {
                    "missing": 39,
                    "typos": 0,
                    "outliers": 4
                  },
                  "total_price": {
                    "missing": 28,
                    "typos": 0,
                    "outliers": 2
                  },
                  "unit_price": {
                    "missing": 30,
                    "typos": 0,
                    "outliers": 3
                  }
                }
              },
              "shifts": {
                "duplicates": 0,
                "columns": {
                  "cash_float_end": {
                    "missing": 0,
                    "typos": 0,
                    "outliers": 1
                  }
                }
              }
            },
            "totals": {
              "missing": 344,
              "typos": 114,
              "outliers": 28,
              "duplicates": 33
            }
          },
          "downloads": [
            {
              "format": "dirty-sql-postgres",
              "label": "PostgreSQL, with faults",
              "file": "flagship/1k/dirty-postgres.sql.gz",
              "key": "datasets/pharmacy-sample-database/v1/flagship/1k/dirty-postgres.sql.gz",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/dirty-postgres.sql.gz",
              "bytes": 55946,
              "sha256": "d8432ef79915351db196f0b302282d1e7e1451a2fc68c214759c7d108d81a9ac",
              "raw": {
                "bytes": 194419,
                "sha256": "aefe31ceda5832500229052027ac1df9af65fcfefa0e600ca589d9de958d0fc3"
              },
              "contentType": "application/gzip"
            },
            {
              "format": "dirty-csv",
              "label": "CSV, with faults",
              "file": "flagship/1k/dirty-csv.zip",
              "key": "datasets/pharmacy-sample-database/v1/flagship/1k/dirty-csv.zip",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1k/dirty-csv.zip",
              "bytes": 59149,
              "sha256": "00c1ea4d59b81d4a85e3f7930c2e31a6753a88e11c51cbda5937cc0a00f2c580",
              "tables": {
                "active_ingredients": {
                  "bytes": 1524,
                  "sha256": "26df2b0c7fe2d66edaab08ff8ca70bddae2da624a2e7148120637a2523e0ffa4"
                },
                "branches": {
                  "bytes": 1116,
                  "sha256": "ca97c63eee1ee671d8e4ffb0452b9d0c0cdfdebea80ac248bf9c0c1a722aab6f"
                },
                "coupon_usages": {
                  "bytes": 483,
                  "sha256": "4951b95311f08b8d8adb85135a39db2d3f313be6e327a22309af8dbd83926c0c"
                },
                "coupons": {
                  "bytes": 2759,
                  "sha256": "f1ea9b005bbd01310c019c355802a42ca0b516e87f37455ce5eb2af4c757ebbf"
                },
                "customer_loyalty": {
                  "bytes": 826,
                  "sha256": "f35d0d15d70a57c4c5f2e2e7b01eadacf05451df8b2682a7602c37c23d678eb9"
                },
                "customers": {
                  "bytes": 5787,
                  "sha256": "84df851abbde28ef7ee4b275b3ed39c0d1e6a7fca611b9ac80768e52a3ee48c7"
                },
                "delivery_details": {
                  "bytes": 4161,
                  "sha256": "f90666966b093c97eabf99503f94256dc664875eec262deb7d13aa0c411adc84"
                },
                "doctors": {
                  "bytes": 873,
                  "sha256": "1c4e4990b2b6aa35b417faf12b88ef0a06589265b2ebd12db7557eb725ceb5b3"
                },
                "dosage_forms": {
                  "bytes": 256,
                  "sha256": "c58619109613a95a31fcdc5d3244ca24e5000d88ea47afbfc5d0e558d45b20a1"
                },
                "employees": {
                  "bytes": 507,
                  "sha256": "da46d0ff162109d21ede71e85d3514165fc03abfdec935f9ad36b430f2486dd8"
                },
                "insurance_claims": {
                  "bytes": 2879,
                  "sha256": "6cb134d9b141b947bd2f2b4e0e3c45d57f22c6c9e310731c06277d95e08d8baf"
                },
                "insurance_providers": {
                  "bytes": 883,
                  "sha256": "ba092a2408b4dafb3cbbe7a59cf7ac2ebd75a8c2d50d317b7c189e885e0a6508"
                },
                "inventory_stocks": {
                  "bytes": 437,
                  "sha256": "478c853f37510de5dcc98a0b9032fe935930f313d8469ef078a22ff7b3c03d97"
                },
                "manufacturers": {
                  "bytes": 2966,
                  "sha256": "e078f1d0edb13a954110bbcf9a46fe5d1940e87777a885acad90fe2baacf9259"
                },
                "medicine_categories": {
                  "bytes": 451,
                  "sha256": "024c811efc621aca6fbc669daad3786c063985c0b6a6951d514cfd8be0fb9fc6"
                },
                "medicine_ingredients": {
                  "bytes": 5005,
                  "sha256": "eadd369480cf6dafa309d331ba38349337a32f7dbe98423a73ab5ea76b16be56"
                },
                "medicines": {
                  "bytes": 15491,
                  "sha256": "f2a38b23bc0b70523e7e691ced34a68f2d0933291e08858e58804314da772a5d"
                },
                "packaging_types": {
                  "bytes": 192,
                  "sha256": "2eb22b76b4486d703628ba94c3c825086ed6b144746f9328fe197cbf47edeb60"
                },
                "payment_methods": {
                  "bytes": 172,
                  "sha256": "305f4097f9a7265423d7f3658db31f0af0b28c94dfac4fede932f1f106b1d6fa"
                },
                "payments": {
                  "bytes": 15505,
                  "sha256": "93fce560d265aaec90e7020d76527eb3b153501e6a653989d71112ffae7e75cf"
                },
                "prescription_items": {
                  "bytes": 5578,
                  "sha256": "f7ad6827d5eba8673c77cc6b683f5aa4d0030ecee1c579c08a72a726bd2b2c28"
                },
                "prescriptions": {
                  "bytes": 3294,
                  "sha256": "6d677f76e621ada9bea98647ac3ada7036d7de2fc58f1e14fa1504f202553b83"
                },
                "purchase_order_items": {
                  "bytes": 401,
                  "sha256": "c0bbb376ddc682c77c4d771a9831bcea539808c5458378131487793944a23280"
                },
                "purchase_orders": {
                  "bytes": 526,
                  "sha256": "42759699e44c2cc37029e968fefed001008e78ab5c8d72c4b3bb527e4114814a"
                },
                "return_items": {
                  "bytes": 211,
                  "sha256": "c6cdcc63a22b9539828ab48c925c06792f473afcc4a66f4f934f1ec09f3a53c0"
                },
                "returns": {
                  "bytes": 615,
                  "sha256": "6c14c2890611a5670379b661c009a54a15a695f5a08a432d1e7a7f3ca012a782"
                },
                "roles": {
                  "bytes": 191,
                  "sha256": "d570154e00dc5a9cf73ee8dc594865df24faa98531a046f2f825fe75f35b59ed"
                },
                "sale_items": {
                  "bytes": 27461,
                  "sha256": "6da1461ae52047473baa7a3d3c4468f7deebbcb7ac31adf9c4fa596510c11107"
                },
                "sales": {
                  "bytes": 15349,
                  "sha256": "c2a0d8ad4d8fdb4c54e93d903525f60e9425ce6cd9c4a8595446e985d33f3781"
                },
                "shelves": {
                  "bytes": 4381,
                  "sha256": "c773239f09a0537c493e4b127fec9e32f9286d1b90085de37f8acf81bcd5d8cb"
                },
                "shifts": {
                  "bytes": 915,
                  "sha256": "fce3469d16bd2bf72f49faac79898fbbcf4cdae2b86ffb0647621b5cfd6e5bf1"
                },
                "stock_adjustments": {
                  "bytes": 778,
                  "sha256": "fbdcebcd758218d3a9253cad420beb5baa29dbe3f1b7bad468deb993aa4346aa"
                },
                "supplier_invoices": {
                  "bytes": 671,
                  "sha256": "c99841065defb6a737cfd13ba8bcd0b5e83f1f819203ff60319fc39961692f16"
                },
                "suppliers": {
                  "bytes": 2650,
                  "sha256": "d8872d8227e5c7ca8b7da554eebd2e07549954b36ff4c1487b73cc1ede7a748b"
                },
                "user_roles": {
                  "bytes": 92,
                  "sha256": "eed6395f53fd6e6105999c891a96769920e90e4eac61fc41e01eedd647c2e4c7"
                },
                "users": {
                  "bytes": 1183,
                  "sha256": "c50093e37c02b0530c9c5505e98f2cc0548be9bd9fc730295c1e70763ed12521"
                }
              },
              "contentType": "application/zip"
            }
          ]
        }
      },
      "100k": {
        "rows": 209275,
        "counts": {
          "active_ingredients": 50,
          "branches": 15,
          "coupons": 60,
          "customers": 6000,
          "customer_loyalty": 2000,
          "doctors": 200,
          "dosage_forms": 8,
          "insurance_providers": 8,
          "manufacturers": 30,
          "medicine_categories": 12,
          "packaging_types": 6,
          "medicines": 240,
          "medicine_ingredients": 300,
          "payment_methods": 5,
          "prescriptions": 8000,
          "prescription_items": 15000,
          "roles": 6,
          "shelves": 150,
          "inventory_stocks": 400,
          "suppliers": 25,
          "purchase_orders": 300,
          "purchase_order_items": 1500,
          "supplier_invoices": 300,
          "users": 120,
          "employees": 100,
          "sales": 30000,
          "coupon_usages": 3000,
          "delivery_details": 4000,
          "insurance_claims": 5000,
          "payments": 29000,
          "returns": 600,
          "return_items": 900,
          "sale_items": 100000,
          "shifts": 1200,
          "stock_adjustments": 600,
          "user_roles": 140
        },
        "notes": [],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/100k/postgres.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/100k/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/postgres.sql.gz",
            "bytes": 3504954,
            "sha256": "054ecb1a17c365147d146d0035435423d18d1ff3b05b899cc3ecd501f590b709",
            "raw": {
              "bytes": 12444119,
              "sha256": "653e61fd5006e6cece7f7ccb3570217a401a6c5ad897f7f245da9efeba63d154"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/100k/mysql.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/100k/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/mysql.sql.gz",
            "bytes": 3503183,
            "sha256": "736b8e37b007c188f370d0181eb94b4060a7c296e48c18571ea9bdc3662d1c76",
            "raw": {
              "bytes": 12439168,
              "sha256": "9f5a894efb6b379e8d7968921df55df3ad680094e3061e052311984fdad8031c"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/100k/sqlite.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/100k/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/sqlite.sql.gz",
            "bytes": 3502457,
            "sha256": "0cf25235ea99962e36506e60c43291608f5f7d097a469d952f27cc242ad544df",
            "raw": {
              "bytes": 12436025,
              "sha256": "c583d8f7839b2bb36f03303c9aa828ab4ae1e8e4fb607ce3e1a97276f73eb0ee"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/100k/csv.zip",
            "key": "datasets/pharmacy-sample-database/v1/flagship/100k/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/csv.zip",
            "bytes": 3485896,
            "sha256": "40efab2724687a97399fb6724e13baa2672b2eca73fc00ce1a0df1e661bdf8f2",
            "tables": {
              "active_ingredients": {
                "bytes": 1516,
                "sha256": "b537aa2b94ae5fcb81cf632709251b963ef7a5122a2cb4056707569868813f0e"
              },
              "branches": {
                "bytes": 1132,
                "sha256": "01fd9650c658280dd98110447f37716aeecfdd86209d4a635d06972cd34737df"
              },
              "coupon_usages": {
                "bytes": 57214,
                "sha256": "ad2a24ee03a3ab26946e0e3200add549257a49cacfbf1a6c6608978064521757"
              },
              "coupons": {
                "bytes": 2585,
                "sha256": "fc2dc839ffa8a5c522d03cac393d6a9874e10f29f4bfd5d504f91601908e6f85"
              },
              "customer_loyalty": {
                "bytes": 84085,
                "sha256": "1ecdd867264ded33d9b7ab7175bf666d2e4c2a7f8d628bdd7265a0ed030ee49e"
              },
              "customers": {
                "bytes": 590750,
                "sha256": "d5fc0b225766921f3423e8ce2f7e5a6c2d361de53c3f8f17b57fbf70b9a68655"
              },
              "delivery_details": {
                "bytes": 435088,
                "sha256": "bcf9ca94005e3212be161b59545c9086633ef524eaf8fab6fc22a488381cfa4d"
              },
              "doctors": {
                "bytes": 17107,
                "sha256": "98a0f4805b512ff0c6f13b4c1d5beb5b8cae99933703d56ac340a595ea2462a7"
              },
              "dosage_forms": {
                "bytes": 241,
                "sha256": "ea1c6e6ca4d39b9bb4078b40092fc19368e20ede7680928a9a0ac0f39ecf24ec"
              },
              "employees": {
                "bytes": 4616,
                "sha256": "9ae1ee0914d7f237bd2cfae2fe5e10b40dd565af68a6650a23bd2d5d20c8f4ca"
              },
              "insurance_claims": {
                "bytes": 302448,
                "sha256": "532458a696ec1232f7aac19ac0266369ad838aef85f693585a27eee0cfe40c12"
              },
              "insurance_providers": {
                "bytes": 863,
                "sha256": "2b989d276d15771619d0423da78d3e9f823c51cbf43685c9dfcd5c208155e13f"
              },
              "inventory_stocks": {
                "bytes": 15403,
                "sha256": "2daffc7ce04f36795b5c62813ed12162ca54332028fd45c94cc6c870396b4c1e"
              },
              "manufacturers": {
                "bytes": 3120,
                "sha256": "916bc9a0fffb783bf0df4d5cff8dfa00beac2b20e455ce5f0e20250d7796e070"
              },
              "medicine_categories": {
                "bytes": 548,
                "sha256": "ee66941fefb58d017f4f197c605890e7207c31ebc5b4b6a226cfd1dc5992a54c"
              },
              "medicine_ingredients": {
                "bytes": 5060,
                "sha256": "516b1e98bec1c5873362b14c6a44bfd31b7a879cc6aa03de914cbd673577c3f9"
              },
              "medicines": {
                "bytes": 15673,
                "sha256": "6f66ebcfdf3bef335d6af3e0ba0a7dd78f978cabe6dae76a393160f009c7e2c2"
              },
              "packaging_types": {
                "bytes": 174,
                "sha256": "62427ec449b0f2c07c009a74b33a1db5ea43077453f91620dd710022f5dc014b"
              },
              "payment_methods": {
                "bytes": 166,
                "sha256": "4df4b885724b7b20488f9828f43808725fe636c1c78fba1f26f127e3f6e91aa0"
              },
              "payments": {
                "bytes": 1673282,
                "sha256": "dd954fdc3c31826a8dfc3044c65312aa91a4261c8320aab9c67d68fe4f59d2e8"
              },
              "prescription_items": {
                "bytes": 607738,
                "sha256": "d9361f1eaa4d526a34c2172fc438c1cc5ba5355da71ea8acc42bb1b6d9d4b25f"
              },
              "prescriptions": {
                "bytes": 367606,
                "sha256": "3b469a357a4eb89d4882a867a2a059c0f6a44147ee53ac7b6d3af4b411edaa39"
              },
              "purchase_order_items": {
                "bytes": 36963,
                "sha256": "52762ad70f2fe9a2af82029c35a0c3d873896f5d520ac863d4cc440ee29342d0"
              },
              "purchase_orders": {
                "bytes": 14633,
                "sha256": "6a7e50309e0e04a552b39fcb50d4be302cc097cce6972a5c9eae7b7e3593f080"
              },
              "return_items": {
                "bytes": 17641,
                "sha256": "3c1355dd9aa1b9fa58ec8deefd8246e5b87abb60043b9bc85c36a5e3d64a3b4d"
              },
              "returns": {
                "bytes": 38766,
                "sha256": "238833ab3cccbcf5fb4b80609229ce8805b456199aa5887095aac24e4df9f15e"
              },
              "roles": {
                "bytes": 206,
                "sha256": "c687cc0158cf55812df1665ae6bb4f6564facbee47e90aaea6a725286433c75f"
              },
              "sale_items": {
                "bytes": 3146862,
                "sha256": "f787a5c5f93d59934767e3b749b687d22d9525c3b1744d272687cd0428c8e755"
              },
              "sales": {
                "bytes": 1696234,
                "sha256": "f478710b360affbfa774c8536d59ad3b2a38d4ff129b57714e6390f53a0a73ae"
              },
              "shelves": {
                "bytes": 4517,
                "sha256": "dc7f8d0ad63588560719fdcd8ef3a0317f897217d91f52fcdd874b9d5f67309a"
              },
              "shifts": {
                "bytes": 86532,
                "sha256": "dda7d6c3513785a043b3c8a4677fb7392436f13b88f2a19d176c8840162f7e93"
              },
              "stock_adjustments": {
                "bytes": 44232,
                "sha256": "83ecde166b9fdf0a01278963798709682a3d621c412cefcdd3572fc79f618677"
              },
              "supplier_invoices": {
                "bytes": 18777,
                "sha256": "b92dd6d7234187dac53359bc26131242b4776a5be480738a11a1580e5d1b4fe8"
              },
              "suppliers": {
                "bytes": 2528,
                "sha256": "463a41b92a4e7f05ed99e7b533e2c25b19bfccf471fecd1b1ecf6c858e260d4f"
              },
              "user_roles": {
                "bytes": 1286,
                "sha256": "7c08ac7e21b426fc6f011febbfa33c1ba03ba6340cc0e565e4483e57bfc61607"
              },
              "users": {
                "bytes": 13520,
                "sha256": "0a225e228b46c24d3c89927048408d4ca2bebc2c103869f1a74ea70dd547947c"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every sale line is its quantity times the medicine price",
            "violations": 0
          },
          {
            "name": "Every sale total is the sum of its lines",
            "violations": 0
          },
          {
            "name": "A coupon discounts the sale, never by more than its total",
            "violations": 0
          },
          {
            "name": "Tax is 8% of the discounted total, and the net is that plus tax",
            "violations": 0
          },
          {
            "name": "Every payment is its sale’s net amount",
            "violations": 0
          },
          {
            "name": "A claim is for its sale, and never approved for more",
            "violations": 0
          },
          {
            "name": "A delivery has an arrival time exactly when it was delivered",
            "violations": 0
          },
          {
            "name": "Nothing is dispensed or received beyond what was asked for",
            "violations": 0
          },
          {
            "name": "A paid invoice is paid in full, an unpaid one not at all",
            "violations": 0
          }
        ],
        "dirty": {
          "report": {
            "rates": {
              "missing": 0.03,
              "typos": 0.03,
              "outliers": 0.005,
              "duplicates": 0.01
            },
            "tables": {
              "active_ingredients": {
                "duplicates": 1,
                "columns": {
                  "description": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 2,
                    "outliers": 0
                  }
                }
              },
              "branches": {
                "duplicates": 0,
                "columns": {
                  "email": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "coupons": {
                "duplicates": 2,
                "columns": {
                  "code": {
                    "missing": 1,
                    "typos": 3,
                    "outliers": 0
                  },
                  "discount_percentage": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 0
                  },
                  "is_active": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "max_discount": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 1
                  }
                }
              },
              "customers": {
                "duplicates": 57,
                "columns": {
                  "address": {
                    "missing": 193,
                    "typos": 169,
                    "outliers": 0
                  },
                  "date_of_birth": {
                    "missing": 162,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 173,
                    "typos": 178,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 197,
                    "typos": 195,
                    "outliers": 0
                  },
                  "gender": {
                    "missing": 181,
                    "typos": 174,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 175,
                    "typos": 201,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 188,
                    "typos": 59,
                    "outliers": 0
                  }
                }
              },
              "customer_loyalty": {
                "duplicates": 26,
                "columns": {
                  "last_updated": {
                    "missing": 65,
                    "typos": 0,
                    "outliers": 0
                  },
                  "points_balance": {
                    "missing": 51,
                    "typos": 0,
                    "outliers": 14
                  },
                  "tier": {
                    "missing": 65,
                    "typos": 62,
                    "outliers": 0
                  }
                }
              },
              "doctors": {
                "duplicates": 4,
                "columns": {
                  "email": {
                    "missing": 7,
                    "typos": 5,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 6,
                    "typos": 3,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 1,
                    "typos": 7,
                    "outliers": 0
                  },
                  "license_number": {
                    "missing": 8,
                    "typos": 7,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 4,
                    "typos": 2,
                    "outliers": 0
                  },
                  "specialty": {
                    "missing": 6,
                    "typos": 6,
                    "outliers": 0
                  }
                }
              },
              "dosage_forms": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "insurance_providers": {
                "duplicates": 0,
                "columns": {
                  "address": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "manufacturers": {
                "duplicates": 0,
                "columns": {
                  "contact_person": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 3,
                    "typos": 2,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "medicines": {
                "duplicates": 1,
                "columns": {
                  "name": {
                    "missing": 8,
                    "typos": 8,
                    "outliers": 0
                  },
                  "price": {
                    "missing": 7,
                    "typos": 0,
                    "outliers": 1
                  },
                  "requires_prescription": {
                    "missing": 8,
                    "typos": 0,
                    "outliers": 0
                  },
                  "scientific_name": {
                    "missing": 10,
                    "typos": 6,
                    "outliers": 0
                  },
                  "sku": {
                    "missing": 10,
                    "typos": 9,
                    "outliers": 0
                  },
                  "strength": {
                    "missing": 5,
                    "typos": 9,
                    "outliers": 0
                  }
                }
              },
              "medicine_ingredients": {
                "duplicates": 0,
                "columns": {
                  "strength": {
                    "missing": 5,
                    "typos": 12,
                    "outliers": 0
                  }
                }
              },
              "payment_methods": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "prescriptions": {
                "duplicates": 78,
                "columns": {
                  "expiry_date": {
                    "missing": 235,
                    "typos": 0,
                    "outliers": 0
                  },
                  "issue_date": {
                    "missing": 226,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 274,
                    "typos": 243,
                    "outliers": 0
                  }
                }
              },
              "prescription_items": {
                "duplicates": 151,
                "columns": {
                  "dispensed_quantity": {
                    "missing": 455,
                    "typos": 0,
                    "outliers": 60
                  },
                  "dosage_instruction": {
                    "missing": 470,
                    "typos": 475,
                    "outliers": 0
                  },
                  "prescribed_quantity": {
                    "missing": 461,
                    "typos": 0,
                    "outliers": 72
                  }
                }
              },
              "shelves": {
                "duplicates": 1,
                "columns": {
                  "code": {
                    "missing": 4,
                    "typos": 6,
                    "outliers": 0
                  },
                  "location_description": {
                    "missing": 4,
                    "typos": 5,
                    "outliers": 0
                  }
                }
              },
              "inventory_stocks": {
                "duplicates": 3,
                "columns": {
                  "batch_number": {
                    "missing": 16,
                    "typos": 11,
                    "outliers": 0
                  },
                  "expiry_date": {
                    "missing": 11,
                    "typos": 0,
                    "outliers": 0
                  },
                  "quantity": {
                    "missing": 9,
                    "typos": 0,
                    "outliers": 2
                  }
                }
              },
              "suppliers": {
                "duplicates": 0,
                "columns": {
                  "address": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "contact_name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 2,
                    "typos": 3,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "purchase_orders": {
                "duplicates": 1,
                "columns": {
                  "delivery_date": {
                    "missing": 14,
                    "typos": 0,
                    "outliers": 0
                  },
                  "order_date": {
                    "missing": 10,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 11,
                    "typos": 8,
                    "outliers": 0
                  },
                  "total_amount": {
                    "missing": 9,
                    "typos": 0,
                    "outliers": 2
                  }
                }
              },
              "purchase_order_items": {
                "duplicates": 14,
                "columns": {
                  "quantity_ordered": {
                    "missing": 48,
                    "typos": 0,
                    "outliers": 8
                  },
                  "quantity_received": {
                    "missing": 34,
                    "typos": 0,
                    "outliers": 6
                  },
                  "unit_cost": {
                    "missing": 41,
                    "typos": 0,
                    "outliers": 6
                  }
                }
              },
              "supplier_invoices": {
                "duplicates": 5,
                "columns": {
                  "due_date": {
                    "missing": 7,
                    "typos": 0,
                    "outliers": 0
                  },
                  "invoice_date": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 0
                  },
                  "invoice_number": {
                    "missing": 11,
                    "typos": 8,
                    "outliers": 0
                  },
                  "paid_amount": {
                    "missing": 15,
                    "typos": 0,
                    "outliers": 3
                  },
                  "status": {
                    "missing": 5,
                    "typos": 6,
                    "outliers": 0
                  },
                  "total_amount": {
                    "missing": 7,
                    "typos": 0,
                    "outliers": 1
                  }
                }
              },
              "users": {
                "duplicates": 0,
                "columns": {
                  "email": {
                    "missing": 7,
                    "typos": 1,
                    "outliers": 0
                  },
                  "is_active": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "password_hash": {
                    "missing": 3,
                    "typos": 5,
                    "outliers": 0
                  },
                  "username": {
                    "missing": 4,
                    "typos": 4,
                    "outliers": 0
                  }
                }
              },
              "employees": {
                "duplicates": 0,
                "columns": {
                  "first_name": {
                    "missing": 5,
                    "typos": 2,
                    "outliers": 0
                  },
                  "hire_date": {
                    "missing": 5,
                    "typos": 0,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 7,
                    "typos": 2,
                    "outliers": 0
                  },
                  "license_number": {
                    "missing": 2,
                    "typos": 2,
                    "outliers": 0
                  }
                }
              },
              "sales": {
                "duplicates": 315,
                "columns": {
                  "discount_amount": {
                    "missing": 904,
                    "typos": 0,
                    "outliers": 10
                  },
                  "net_amount": {
                    "missing": 895,
                    "typos": 0,
                    "outliers": 146
                  },
                  "sale_date": {
                    "missing": 994,
                    "typos": 0,
                    "outliers": 0
                  },
                  "tax_amount": {
                    "missing": 868,
                    "typos": 0,
                    "outliers": 154
                  },
                  "total_amount": {
                    "missing": 959,
                    "typos": 0,
                    "outliers": 143
                  }
                }
              },
              "coupon_usages": {
                "duplicates": 40,
                "columns": {
                  "discount_applied": {
                    "missing": 76,
                    "typos": 0,
                    "outliers": 13
                  }
                }
              },
              "delivery_details": {
                "duplicates": 37,
                "columns": {
                  "actual_delivery": {
                    "missing": 94,
                    "typos": 0,
                    "outliers": 0
                  },
                  "delivery_address": {
                    "missing": 126,
                    "typos": 123,
                    "outliers": 0
                  },
                  "estimated_delivery": {
                    "missing": 108,
                    "typos": 0,
                    "outliers": 0
                  },
                  "recipient_name": {
                    "missing": 116,
                    "typos": 108,
                    "outliers": 0
                  },
                  "recipient_phone": {
                    "missing": 118,
                    "typos": 47,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 102,
                    "typos": 117,
                    "outliers": 0
                  }
                }
              },
              "insurance_claims": {
                "duplicates": 40,
                "columns": {
                  "approved_amount": {
                    "missing": 119,
                    "typos": 0,
                    "outliers": 16
                  },
                  "claim_amount": {
                    "missing": 157,
                    "typos": 0,
                    "outliers": 18
                  },
                  "policy_number": {
                    "missing": 146,
                    "typos": 162,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 138,
                    "typos": 150,
                    "outliers": 0
                  },
                  "submission_date": {
                    "missing": 131,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "payments": {
                "duplicates": 276,
                "columns": {
                  "amount": {
                    "missing": 853,
                    "typos": 0,
                    "outliers": 115
                  },
                  "payment_date": {
                    "missing": 837,
                    "typos": 0,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 857,
                    "typos": 868,
                    "outliers": 0
                  }
                }
              },
              "returns": {
                "duplicates": 5,
                "columns": {
                  "reason": {
                    "missing": 14,
                    "typos": 18,
                    "outliers": 0
                  },
                  "return_date": {
                    "missing": 17,
                    "typos": 0,
                    "outliers": 0
                  },
                  "total_refund_amount": {
                    "missing": 22,
                    "typos": 0,
                    "outliers": 2
                  }
                }
              },
              "return_items": {
                "duplicates": 11,
                "columns": {
                  "quantity": {
                    "missing": 22,
                    "typos": 0,
                    "outliers": 3
                  },
                  "refund_amount": {
                    "missing": 28,
                    "typos": 0,
                    "outliers": 9
                  }
                }
              },
              "sale_items": {
                "duplicates": 1032,
                "columns": {
                  "discount_amount": {
                    "missing": 2960,
                    "typos": 0,
                    "outliers": 0
                  },
                  "quantity": {
                    "missing": 2963,
                    "typos": 0,
                    "outliers": 527
                  },
                  "total_price": {
                    "missing": 3036,
                    "typos": 0,
                    "outliers": 470
                  },
                  "unit_price": {
                    "missing": 2962,
                    "typos": 0,
                    "outliers": 498
                  }
                }
              },
              "shifts": {
                "duplicates": 14,
                "columns": {
                  "cash_float_end": {
                    "missing": 36,
                    "typos": 0,
                    "outliers": 7
                  },
                  "cash_float_start": {
                    "missing": 34,
                    "typos": 0,
                    "outliers": 3
                  },
                  "end_time": {
                    "missing": 37,
                    "typos": 0,
                    "outliers": 0
                  },
                  "start_time": {
                    "missing": 35,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 38,
                    "typos": 38,
                    "outliers": 0
                  }
                }
              },
              "stock_adjustments": {
                "duplicates": 7,
                "columns": {
                  "adjustment_date": {
                    "missing": 16,
                    "typos": 0,
                    "outliers": 0
                  },
                  "adjustment_type": {
                    "missing": 12,
                    "typos": 10,
                    "outliers": 0
                  },
                  "quantity_adjusted": {
                    "missing": 15,
                    "typos": 0,
                    "outliers": 2
                  },
                  "reason": {
                    "missing": 16,
                    "typos": 14,
                    "outliers": 0
                  }
                }
              },
              "user_roles": {
                "duplicates": 4,
                "columns": {}
              }
            },
            "totals": {
              "missing": 24846,
              "typos": 3565,
              "outliers": 2312,
              "duplicates": 2125
            }
          },
          "downloads": [
            {
              "format": "dirty-sql-postgres",
              "label": "PostgreSQL, with faults",
              "file": "flagship/100k/dirty-postgres.sql.gz",
              "key": "datasets/pharmacy-sample-database/v1/flagship/100k/dirty-postgres.sql.gz",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/dirty-postgres.sql.gz",
              "bytes": 3545167,
              "sha256": "b05dbf888c4002353707edd54584e08699599f28d13cd57f60b6f28acb2681c4",
              "raw": {
                "bytes": 12487844,
                "sha256": "73af6a95f12ff7e6aa972d2a5c7c0847578cc21b3185b9946feaf59ca2f464dd"
              },
              "contentType": "application/gzip"
            },
            {
              "format": "dirty-csv",
              "label": "CSV, with faults",
              "file": "flagship/100k/dirty-csv.zip",
              "key": "datasets/pharmacy-sample-database/v1/flagship/100k/dirty-csv.zip",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/100k/dirty-csv.zip",
              "bytes": 3504304,
              "sha256": "495d707a333de73c1c7f9f59a5f648c59002f91ab16c28b78eaaa8e65404fb89",
              "tables": {
                "active_ingredients": {
                  "bytes": 1528,
                  "sha256": "74929a647b2ea4b7808f0eda942a1f865b358f6da3f15f076262fdecf22d539c"
                },
                "branches": {
                  "bytes": 1100,
                  "sha256": "80efcab3cb3683092a4dcc272e8b764d39274c07ef5bfa7a51ef7350ea099a65"
                },
                "coupon_usages": {
                  "bytes": 57684,
                  "sha256": "d819a75dcbf235f1d7ecfc20700dc1a117bec8bb2896f5243a6884d3d39cd749"
                },
                "coupons": {
                  "bytes": 2626,
                  "sha256": "915ecbb9fb3fd713d492275c17beda663bb1f33e4c3ba2864ebbd38d9e5143ce"
                },
                "customer_loyalty": {
                  "bytes": 83468,
                  "sha256": "88c935b31eac799d2ded625b28690acdd0be083fe4edeee91ce7c9b3012d5dad"
                },
                "customers": {
                  "bytes": 581917,
                  "sha256": "b4e517c6ae151f14ff3d8f8b3fc839add40f0ad141cc77a6037ea419a6ff8027"
                },
                "delivery_details": {
                  "bytes": 429102,
                  "sha256": "f15a582753875436447619d0464dc316f7bb34ace8beaebc86fbe1b05dc723fd"
                },
                "doctors": {
                  "bytes": 17032,
                  "sha256": "c8e62d1590eddee7f24de5a491067f79de0101ec7cddf6853b89b8657037e3f6"
                },
                "dosage_forms": {
                  "bytes": 230,
                  "sha256": "7b89e04b2da4a21febf65af4a093e25da65463099165e6792fcc33391d8ddb89"
                },
                "employees": {
                  "bytes": 4481,
                  "sha256": "6506aefb401d529a1e61b52d39150abe5e602696373d7ac18af2e45a94cc0dd6"
                },
                "insurance_claims": {
                  "bytes": 299215,
                  "sha256": "5cf90bb50110639cf56801f9f8209d0e0b6f4cee1fe4d70c65ceaec3633b5ddf"
                },
                "insurance_providers": {
                  "bytes": 742,
                  "sha256": "6e3c1c5afbad25ea872fa02362ff655798271848e2df30562cd7727a6849728a"
                },
                "inventory_stocks": {
                  "bytes": 15238,
                  "sha256": "86606ed78d482f3f781f393065c9c941793dfd3878fcdd1037c7ff15a16f2c64"
                },
                "manufacturers": {
                  "bytes": 3006,
                  "sha256": "5ea33b8ed503df822cc885eda7e71052ca49bcef9803144c377c52b7f11d821b"
                },
                "medicine_categories": {
                  "bytes": 548,
                  "sha256": "ee66941fefb58d017f4f197c605890e7207c31ebc5b4b6a226cfd1dc5992a54c"
                },
                "medicine_ingredients": {
                  "bytes": 5052,
                  "sha256": "a8b30d92315ae983e623ab063023451a5f017cb4deaea05200a42d1dff3f58a8"
                },
                "medicines": {
                  "bytes": 15420,
                  "sha256": "00c0c32d49af10a9e6151e0059c9ec1f12852be0449ca3b1d05973dc12e8d918"
                },
                "packaging_types": {
                  "bytes": 174,
                  "sha256": "62427ec449b0f2c07c009a74b33a1db5ea43077453f91620dd710022f5dc014b"
                },
                "payment_methods": {
                  "bytes": 144,
                  "sha256": "bf33e6c38cfd1a1ef4866d6699f618196ba58890af55dd838329a7360c7a0632"
                },
                "payments": {
                  "bytes": 1655558,
                  "sha256": "785e3c025dc21082ff282df34f331ef94aca50d96680d86cb1b4a533ac03424e"
                },
                "prescription_items": {
                  "bytes": 603689,
                  "sha256": "7e0f3af1616148d14faad022ffc28a62d708a1146f45ebbb3b590689ede6ad17"
                },
                "prescriptions": {
                  "bytes": 364318,
                  "sha256": "97b8fb01f121e189f363523ec55b52aa171e9d1274d1d0743df9eb4e32fe517c"
                },
                "purchase_order_items": {
                  "bytes": 36930,
                  "sha256": "bdd85a30d464cea65111912d494607d828b80d9c915f25445467d78ccb75e66f"
                },
                "purchase_orders": {
                  "bytes": 14305,
                  "sha256": "cfb9a475ec7194d94385aa7df05b71b74f5a437710711400381f899fe789cb07"
                },
                "return_items": {
                  "bytes": 17708,
                  "sha256": "63f4eae2f6da38fadfe2ee39a04f042f2a1f330dbfc715fc03bb0d742c28233d"
                },
                "returns": {
                  "bytes": 38355,
                  "sha256": "dece88ab314807e568ac1a06d00fdc5b6c42ecf719377e1158de20a2ef839e0e"
                },
                "roles": {
                  "bytes": 206,
                  "sha256": "c687cc0158cf55812df1665ae6bb4f6564facbee47e90aaea6a725286433c75f"
                },
                "sale_items": {
                  "bytes": 3146294,
                  "sha256": "ab41d9460039408f0e598914cc06632b108c5538d92c6efeaf6285f463caa147"
                },
                "sales": {
                  "bytes": 1679806,
                  "sha256": "97eb09cd911737c5bda0b69664b88cc799271bc3f004d03219278c33435f9f3a"
                },
                "shelves": {
                  "bytes": 4464,
                  "sha256": "a0863ebcc7be71f836150ff8c6fb6a32d72750a218fabada939bd99e583275a8"
                },
                "shifts": {
                  "bytes": 85476,
                  "sha256": "2ba4739fd3a2831fd6a61b02e503503cd3bd851585283d34e355791297270b08"
                },
                "stock_adjustments": {
                  "bytes": 43871,
                  "sha256": "11efe14a86f060b7881014f4869089167cbb809a6d97875c64e0c611f9f1b972"
                },
                "supplier_invoices": {
                  "bytes": 18653,
                  "sha256": "6f5313f1d2fe4cf41fb417ed95692044298418a1e76c2783a5a2b20dc29e7505"
                },
                "suppliers": {
                  "bytes": 2413,
                  "sha256": "887109e895f790e45ee2b6955fe5caf78f1d31601ad821a224130b671f9d2123"
                },
                "user_roles": {
                  "bytes": 1327,
                  "sha256": "4262835cfe3073c59cdce4e45c9496f94f6e9430f7d089fa6eb65f26a85e24c1"
                },
                "users": {
                  "bytes": 13120,
                  "sha256": "30111a96ceea1cb4496bec90a3c4639906df74cd7f539577a6154483508f5e6f"
                }
              },
              "contentType": "application/zip"
            }
          ]
        }
      },
      "1m": {
        "rows": 2084515,
        "counts": {
          "active_ingredients": 50,
          "branches": 15,
          "coupons": 60,
          "customers": 60000,
          "customer_loyalty": 20000,
          "doctors": 2000,
          "dosage_forms": 8,
          "insurance_providers": 8,
          "manufacturers": 30,
          "medicine_categories": 12,
          "packaging_types": 6,
          "medicines": 240,
          "medicine_ingredients": 300,
          "payment_methods": 5,
          "prescriptions": 80000,
          "prescription_items": 150000,
          "roles": 6,
          "shelves": 150,
          "inventory_stocks": 4000,
          "suppliers": 25,
          "purchase_orders": 3000,
          "purchase_order_items": 15000,
          "supplier_invoices": 3000,
          "users": 1200,
          "employees": 1000,
          "sales": 300000,
          "coupon_usages": 30000,
          "delivery_details": 40000,
          "insurance_claims": 50000,
          "payments": 290000,
          "returns": 6000,
          "return_items": 9000,
          "sale_items": 1000000,
          "shifts": 12000,
          "stock_adjustments": 6000,
          "user_roles": 1400
        },
        "notes": [
          "At this size the tables beside sale_items were cut to 1/16 of it, so the whole build stays under 3,000,000 rows."
        ],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/1m/postgres.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1m/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1m/postgres.sql.gz",
            "bytes": 36166764,
            "sha256": "f4443a1cee0ac6d2dd44428e5142431093dd5016e2732d8929156ffc596b7581",
            "raw": {
              "bytes": 127885769,
              "sha256": "2b3ea1631f89072c9208cc2ea8e148d1fd035ad4d0eb98ccb007498b0997bcd9"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/1m/mysql.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1m/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1m/mysql.sql.gz",
            "bytes": 36164363,
            "sha256": "764266ce3c1d52a89c41000c4c1a5e5d713e94c860f9657193aed6c0e917339b",
            "raw": {
              "bytes": 127877484,
              "sha256": "61e0ea1b0423a72508a542b53f4853b7cbef0a50bcbe3a524da1987868f42e99"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/1m/sqlite.sql.gz",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1m/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1m/sqlite.sql.gz",
            "bytes": 36163725,
            "sha256": "2a9cf13fe592a991257d5310b4f36a26ca70995d23efe22a6f2dd4c063262c02",
            "raw": {
              "bytes": 127874341,
              "sha256": "28b119257a2845ae9245604e96d51eb76747c8c31b4916610135823fdea3796e"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/1m/csv.zip",
            "key": "datasets/pharmacy-sample-database/v1/flagship/1m/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-sample-database/v1/flagship/1m/csv.zip",
            "bytes": 36292023,
            "sha256": "9ee3492aa41f48c22a4befb04f9c8c4690dfb3fba9c306ea1504801c54b21364",
            "tables": {
              "active_ingredients": {
                "bytes": 1526,
                "sha256": "74f137fc0e3a2c2af16e1bb72395bb810f6a3be9bbad49fb62182e4cef6d8d12"
              },
              "branches": {
                "bytes": 1152,
                "sha256": "bf2cb2eaac4e1d2fd1340d3275e3b90f9a20d481188eeec635a42fba919c4b94"
              },
              "coupon_usages": {
                "bytes": 631653,
                "sha256": "79f7ac66deafb14c568f341d47cf645fb23fd986301a02b55f041b29b45b5c61"
              },
              "coupons": {
                "bytes": 2590,
                "sha256": "ffa55809bc56fb352644b395e42092fb34c1910f924b893f0f3e0a22b5132689"
              },
              "customer_loyalty": {
                "bytes": 881111,
                "sha256": "5a1ec889f0ac889cdb83dbfd56ec39d1467f8aecb7803d245a9e4cd456843221"
              },
              "customers": {
                "bytes": 5970308,
                "sha256": "490808258c54cb4d28b19fedc8375601bbac4e75cf0e278e613beedac4423509"
              },
              "delivery_details": {
                "bytes": 4427605,
                "sha256": "a2bf6b1c6d54685c54d86fb2ea98999a146a482d3641366e3026072f979979eb"
              },
              "doctors": {
                "bytes": 173457,
                "sha256": "dff5777e690604d12fc73ee4d1f57b68a38a63a17cade0103d953b32adb94cde"
              },
              "dosage_forms": {
                "bytes": 254,
                "sha256": "7de57d9f15fc8550adb02c37a4a3d7ad4cf39016635db4272af69c9ee25be335"
              },
              "employees": {
                "bytes": 47061,
                "sha256": "3a048ec78001b499c0eadf9e54cfc54b1610c597ca43c7a0a15e751fb2db62f9"
              },
              "insurance_claims": {
                "bytes": 3105405,
                "sha256": "15394e24cf922b17b15c694af07576c8a1def38244cb5a9ac23231cc959b4669"
              },
              "insurance_providers": {
                "bytes": 820,
                "sha256": "56b12fb16a5347db40027c6e7e6e727cea1e8896bb79d7e93af722f738900be4"
              },
              "inventory_stocks": {
                "bytes": 157624,
                "sha256": "63d38162bb1faac159342574a99fe6be67ff2b93cf1109a15cb8decd26dda89c"
              },
              "manufacturers": {
                "bytes": 2962,
                "sha256": "d44245d1254f3997fab573b9dae91ee5a1cd4e02c7a7a887d67893eecdd30094"
              },
              "medicine_categories": {
                "bytes": 487,
                "sha256": "1f6261c4ba5e95787990d04cef733925d0ba7cad200776d89c6f45b251c71306"
              },
              "medicine_ingredients": {
                "bytes": 5005,
                "sha256": "f784239622d776b531d0760ca5a0dd6f193ab9291fdc2dad5c1b6716e440f7ff"
              },
              "medicines": {
                "bytes": 15524,
                "sha256": "4d9e451b55c77dccd1e45dc80520ed4e8de16e08d71c3689933cabf7fd389b7a"
              },
              "packaging_types": {
                "bytes": 170,
                "sha256": "bcd9aa3f2ce68f80f0fb82d342e8b8831e43f0c80cf4d6ac8e280f794835c250"
              },
              "payment_methods": {
                "bytes": 184,
                "sha256": "a1c6296a43a4aa7494f970dad5f175636eb9e0fc8b7d597259f681b6b8f2f904"
              },
              "payments": {
                "bytes": 17288027,
                "sha256": "f266b5cada536a66232df2f4f450fa657239779e445b3f4702810cd7aa7b8983"
              },
              "prescription_items": {
                "bytes": 6387246,
                "sha256": "ed5630ad1a37dcebbbca6b722b4eb3bf26e16b856b403327cf8f1b1cf90760e6"
              },
              "prescriptions": {
                "bytes": 3909957,
                "sha256": "63c9628d30add4f1579d5e591884d361d7ce8e0fe7f492bfa3994de9a5589cb4"
              },
              "purchase_order_items": {
                "bytes": 397717,
                "sha256": "57b9c950f697da6ad235c07feb840e9fe05e1c0eb110496a7f9e010c233d8f16"
              },
              "purchase_orders": {
                "bytes": 148072,
                "sha256": "d8a73fc98fcac4d1ddc1c0462a5f73daa59d364f9daddf6eb77f13e04a68aab2"
              },
              "return_items": {
                "bytes": 193627,
                "sha256": "c6299b1105055a76d2575d8eb48ca70bc78dea6ff002c06bb7a56dcf8de8a962"
              },
              "returns": {
                "bytes": 407408,
                "sha256": "1afab28c39755777028d75b1b90063f23a48de1b6c3a384f2204c51339959cec"
              },
              "roles": {
                "bytes": 194,
                "sha256": "fd1e083e2b2e77827335606a27b3e9a4e2daa3fccdf1b196f1ed8990f42c7a14"
              },
              "sale_items": {
                "bytes": 33301191,
                "sha256": "d497b6d79db095d07c6c5193bc88a3e1a79cc9e00630a408b6bab27aadced44b"
              },
              "sales": {
                "bytes": 17753961,
                "sha256": "910369ec57e3fe636594aceaccf5f7d7fb93077d9ffc946cff1282c1ce397dbf"
              },
              "shelves": {
                "bytes": 4583,
                "sha256": "2a5300d17726f46c41b2e835a36d793df45e63c7ba414f6611f89f3352126f35"
              },
              "shifts": {
                "bytes": 886456,
                "sha256": "0024a2a3902fe1ba7dbf185d0c2a3213a1adfc70618584aa82bba5048c52e9b6"
              },
              "stock_adjustments": {
                "bytes": 455198,
                "sha256": "cae085593e9b38abec046c307c3e1b6433baa0b4c60bda56316a818469648243"
              },
              "supplier_invoices": {
                "bytes": 193087,
                "sha256": "08044cb11c4e1d7ac1979d9427f01bb6145abcad9f5913b375fb04dbe580c93b"
              },
              "suppliers": {
                "bytes": 2536,
                "sha256": "01c2c8deada69e1fb1e7d35857ec713f582be0f30eeacf57005d60561f939c08"
              },
              "user_roles": {
                "bytes": 15319,
                "sha256": "4e5f9b52e707a3979b4172b8c308f10c9302fd45739865d3f77d300287911c0b"
              },
              "users": {
                "bytes": 136023,
                "sha256": "712aa2c194f4e0b67d98d2d5bdcb4ae66cd3d4e349ed3b94c15c2d01d72f74b5"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every sale line is its quantity times the medicine price",
            "violations": 0
          },
          {
            "name": "Every sale total is the sum of its lines",
            "violations": 0
          },
          {
            "name": "A coupon discounts the sale, never by more than its total",
            "violations": 0
          },
          {
            "name": "Tax is 8% of the discounted total, and the net is that plus tax",
            "violations": 0
          },
          {
            "name": "Every payment is its sale’s net amount",
            "violations": 0
          },
          {
            "name": "A claim is for its sale, and never approved for more",
            "violations": 0
          },
          {
            "name": "A delivery has an arrival time exactly when it was delivered",
            "violations": 0
          },
          {
            "name": "Nothing is dispensed or received beyond what was asked for",
            "violations": 0
          },
          {
            "name": "A paid invoice is paid in full, an unpaid one not at all",
            "violations": 0
          }
        ]
      }
    },
    "rules": [
      {
        "name": "Every sale line is its quantity times the medicine price",
        "sql": "SELECT count(*) AS violations FROM sale_items i JOIN medicines m ON m.id = i.medicine_id WHERE i.unit_price <> m.price OR i.total_price <> round(i.quantity * i.unit_price, 2)"
      },
      {
        "name": "Every sale total is the sum of its lines",
        "sql": "SELECT count(*) AS violations FROM sales s LEFT JOIN (SELECT sale_id, sum(total_price) AS lines FROM sale_items GROUP BY sale_id) i ON i.sale_id = s.id WHERE s.total_amount <> COALESCE(i.lines, 0)"
      },
      {
        "name": "A coupon discounts the sale, never by more than its total",
        "sql": "SELECT count(*) AS violations FROM sales s LEFT JOIN (SELECT sale_id, sum(discount_applied) AS off FROM coupon_usages GROUP BY sale_id) c ON c.sale_id = s.id WHERE s.discount_amount <> LEAST(COALESCE(c.off, 0), s.total_amount)"
      },
      {
        "name": "Tax is 8% of the discounted total, and the net is that plus tax",
        "sql": "SELECT count(*) AS violations FROM sales WHERE tax_amount <> round((total_amount - discount_amount) * 0.08, 2) OR net_amount <> total_amount - discount_amount + tax_amount"
      },
      {
        "name": "Every payment is its sale’s net amount",
        "sql": "SELECT count(*) AS violations FROM payments p JOIN sales s ON s.id = p.sale_id WHERE p.amount <> s.net_amount"
      },
      {
        "name": "A claim is for its sale, and never approved for more",
        "sql": "SELECT count(*) AS violations FROM insurance_claims c JOIN sales s ON s.id = c.sale_id WHERE c.claim_amount <> s.net_amount OR c.approved_amount > c.claim_amount"
      },
      {
        "name": "A delivery has an arrival time exactly when it was delivered",
        "sql": "SELECT count(*) AS violations FROM delivery_details WHERE (status = 'delivered') <> (actual_delivery IS NOT NULL)"
      },
      {
        "name": "Nothing is dispensed or received beyond what was asked for",
        "sql": "SELECT (SELECT count(*) FROM prescription_items WHERE dispensed_quantity > prescribed_quantity) + (SELECT count(*) FROM purchase_order_items WHERE quantity_received > quantity_ordered) AS violations"
      },
      {
        "name": "A paid invoice is paid in full, an unpaid one not at all",
        "sql": "SELECT count(*) AS violations FROM supplier_invoices WHERE (status = 'paid' AND paid_amount <> total_amount) OR (status <> 'paid' AND paid_amount IS NOT NULL)"
      }
    ]
  },
  "publishedAt": 1791317868831,
  "updatedAt": 1791317868831
}
