{
  "format": "dataset-manifest/1",
  "slug": "pharmacy-delivery-app",
  "version": 1,
  "seed": "pharmacy-delivery-app:1",
  "spec": {
    "format": "dataset/1",
    "slug": "pharmacy-delivery-app",
    "name": "Pharmacy Delivery Insights",
    "tagline": "Daily pharmacy delivery transactions including user demographics, prescription details, and delivery statuses.",
    "description": "Pharmacies process a high volume of prescription orders daily through a delivery service, catering to user needs efficiently. This dataset captures the essential interactions between customers and pharmacies, detailing user demographics, prescription specifics, delivery statuses, and vehicle types used for delivery. Each transaction reflects routine orders for common medications, with occasional entries for rare specialty prescriptions. The dataset is designed to help developers practice SQL queries and ORM seeding by providing a realistic yet synthetic representation of pharmacy delivery transactions. Data points include customer age, prescription type, delivery time, and inventory levels, which fluctuate based on demand and public health emergencies. By analyzing this dataset, users can gain insights into trends in medication orders, delivery efficiency, and customer demographics, making it a valuable resource for both training and application development.",
    "domain": "pharmacy",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "pharmacy",
      "delivery",
      "prescription",
      "orders",
      "customers",
      "transactions",
      "healthcare",
      "medications"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "deliveries": {
        "description": "Each row represents a delivery transaction, linking customer data with prescription details and delivery status. Key columns provide insights into customer demographics, medication types, and the logistics of delivery.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each delivery transaction."
          },
          "customer_age": {
            "kind": "int",
            "min": 18,
            "max": 100,
            "description": "Age of the customer placing the order."
          },
          "prescription_name": {
            "kind": "words",
            "min": 1,
            "max": 5,
            "description": "Name of the prescribed medication."
          },
          "quantity": {
            "kind": "int",
            "min": 1,
            "max": 30,
            "description": "Quantity of medication ordered."
          },
          "delivery_status": {
            "kind": "enum",
            "values": [
              "pending",
              "in transit",
              "delivered",
              "canceled"
            ],
            "weights": [
              50,
              30,
              15,
              5
            ],
            "description": "Current status of the delivery."
          },
          "delivery_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp of when the delivery occurred.",
            "dayProfile": "waking"
          },
          "vehicle_type": {
            "kind": "enum",
            "values": [
              "bike",
              "car",
              "van"
            ],
            "weights": [
              20,
              50,
              30
            ],
            "description": "Type of vehicle used for delivery."
          },
          "inventory_level": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "Available stock of the prescribed medication at the pharmacy."
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "categorical",
      "timestamped",
      "high-cardinality"
    ],
    "analysisQuestions": [
      "What are the most commonly prescribed medications among different age groups?",
      "How does the delivery time vary based on vehicle type used?",
      "What percentage of orders are canceled and what are the common reasons?",
      "Are there noticeable trends in prescription orders during public health emergencies?",
      "How does inventory level impact the delivery status of prescriptions?"
    ],
    "suggestedQueries": [
      {
        "title": "Basic Delivery Overview",
        "sql": "SELECT delivery_status, COUNT(*) AS total_deliveries FROM deliveries GROUP BY delivery_status;",
        "dialect": "postgres"
      },
      {
        "title": "Average Delivery Time",
        "sql": "SELECT AVG(EXTRACT(EPOCH FROM delivery_time)) AS average_delivery_time FROM deliveries;",
        "dialect": "postgres"
      },
      {
        "title": "Deliveries by Vehicle Type",
        "sql": "SELECT vehicle_type, COUNT(*) AS delivery_count FROM deliveries GROUP BY vehicle_type;",
        "dialect": "postgres"
      },
      {
        "title": "Prescription Trends by Age",
        "sql": "SELECT customer_age, COUNT(*) AS prescription_count FROM deliveries GROUP BY customer_age ORDER BY customer_age;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Data Analysis for Pharmacies",
        "body": "Pharmacy managers can use this dataset to analyze delivery trends, helping them optimize their logistics and inventory management. By examining delivery statuses and vehicle types, they can identify areas for improvement in their operations and enhance customer satisfaction."
      },
      {
        "title": "Training Machine Learning Models",
        "body": "Data scientists can leverage this synthetic dataset to train machine learning models aimed at predicting delivery times based on various factors. This could lead to more efficient routing and improved service for customers relying on timely medication deliveries."
      },
      {
        "title": "Developing SQL Skills",
        "body": "Students and new developers can use this dataset to practice SQL queries, honing their skills in data manipulation and analysis. By exploring the relationships between different columns, they can gain insights into the pharmacy delivery process and learn how to extract valuable information from transactional data."
      }
    ]
  },
  "counts": {
    "deliveries": 500
  },
  "stats": {
    "deliveries": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_age": {
          "nulls": 0,
          "distinct": 83,
          "min": 18,
          "max": 100
        },
        "prescription_name": {
          "nulls": 0,
          "distinct": 467
        },
        "quantity": {
          "nulls": 0,
          "distinct": 30,
          "min": 1,
          "max": 30
        },
        "delivery_status": {
          "nulls": 0,
          "distinct": 4,
          "min": "canceled",
          "max": "pending"
        },
        "delivery_time": {
          "nulls": 0,
          "distinct": 500,
          "min": "2023-01-01 22:23:09",
          "max": "2023-12-31 18:26:24"
        },
        "vehicle_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "bike",
          "max": "van"
        },
        "inventory_level": {
          "nulls": 0,
          "distinct": 397,
          "min": 10,
          "max": 997
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/deliveries.csv",
      "format": "csv",
      "table": "deliveries",
      "key": "datasets/pharmacy-delivery-app/v1/csv/deliveries.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/csv/deliveries.csv",
      "bytes": 34043,
      "sha256": "4326cfd806a969ec1b6c8498f3229ecc4b4d2b1abb7182b76a7e3451492ca2d0",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "pharmacy-delivery-app.json",
      "format": "json",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/pharmacy-delivery-app.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/pharmacy-delivery-app.json",
      "bytes": 134465,
      "sha256": "ce86b23faf51b9b57769eb9c3f5814eb269c0c0ac9492013cde79b4eddac2b84",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/sql/postgres.sql",
      "bytes": 45682,
      "sha256": "22fa91d7cb232c8d6b6b3f1980d8ee9af26c4484e6719f8d6508ee6bd856926a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/sql/mysql.sql",
      "bytes": 45566,
      "sha256": "73c0ddb760b11e1ca243723918114e7da4c68e1c2bc3b6232c3b7cf266276bb1",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/sql/mssql.sql",
      "bytes": 47635,
      "sha256": "e4e8641259dc57f9df0dfe4be3a4bfb56ee4c3fcc28eeaefa06f23d1ad672673",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/sql/sqlite.sql",
      "bytes": 45537,
      "sha256": "936275a5c8216688b4f4788098153f1d9d56ae21c8ae187a7518dfad2594ec82",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/prisma/seed.ts",
      "bytes": 110683,
      "sha256": "01f2b305f47fd874225b214403928dd2ebea9cfed53f6c97c3150d3f14bb3411",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/pharmacy-delivery-app/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/pharmacy-delivery-app/v1/django/fixtures.json",
      "bytes": 157443,
      "sha256": "6e01d1d866cdcf6600a5d75e852208fd7c94ade5dfd1bd4f3b509488d264f1f4",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767872120,
  "updatedAt": 1788767872120
}
