{
  "format": "dataset-manifest/1",
  "slug": "policy-endorsements",
  "version": 2,
  "seed": "policy-endorsements:1",
  "spec": {
    "format": "dataset/1",
    "slug": "policy-endorsements",
    "name": "Policy Endorsements",
    "tagline": "Versioned rows of insurance policies and endorsements, detailing coverage changes over time.",
    "description": "Clients purchase policies to secure insurance coverage for various items, and these policies can be adjusted over time through endorsements. Each endorsement modifies the terms of an existing policy, allowing for changes in coverage, limits, or insured items. The business manages these policy changes meticulously, ensuring that a historical record is maintained, which is essential for verifying the coverage that was active on any given date.\n\nThe core tables in this dataset include policies, endorsements, insured_items, and clients. Each policy represents an insurance contract between the company and a client, detailing the coverage terms. Endorsements are associated with policies, capturing every change made to the policy after its original issuance. Each endorsement is linked to a specific policy and can directly influence the insured items, which are the physical or intangible items covered by the policy. The clients table holds the information about individuals or entities that hold these policies, allowing you to see who is covered under which policy and the endorsements that apply to them.\n\nOne row from the policies table might represent a standard home insurance policy, while an associated endorsement row reflects an increase in the coverage limit for that policy. The insured_items table would then contain rows for the specific items covered under that policy, such as furniture, electronics, or jewelry, whereas the clients table connects each of these policies to the respective policyholders.\n\nThis dataset allows developers to answer various questions regarding policy management, such as how endorsements affect coverage over time, what items are insured under specific policies, and how client demographics correlate with policy selections. It is excellent for practicing data manipulation, understanding relational databases, and conducting analytics on dynamic insurance scenarios. The data provided here is synthetic, designed to mimic real-world insurance operations while letting developers explore and experiment without privacy concerns.",
    "domain": "insurance",
    "shape": "slowly-changing",
    "useCases": [
      "teaching",
      "sql-practice"
    ],
    "keywords": [
      "insurance",
      "policies",
      "endorsements",
      "versioning",
      "coverage",
      "data modeling",
      "SQL practice"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "policies": {
        "description": "This table contains the main policies, each identified by a unique policy_id. It links to the clients and tracks the effective date of the policy.",
        "rows": 200,
        "columns": {
          "policy_id": {
            "kind": "pk",
            "description": "Unique identifier for each policy."
          },
          "client_id": {
            "kind": "fk",
            "ref": "clients.client_id",
            "description": "Identifier linking to the client who owns the policy."
          },
          "effective_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date from which the policy is effective.",
            "trend": "growing"
          },
          "status": {
            "kind": "enum",
            "values": [
              "active",
              "inactive"
            ],
            "description": "Current status of the policy.",
            "weights": [
              8,
              2
            ]
          }
        }
      },
      "endorsements": {
        "description": "This table records endorsements that modify existing policies, linking to the corresponding policy and capturing the change date.",
        "rows": 300,
        "columns": {
          "endorsement_id": {
            "kind": "pk",
            "description": "Unique identifier for each endorsement."
          },
          "policy_id": {
            "kind": "fk",
            "ref": "policies.policy_id",
            "description": "Identifier linking to the associated policy."
          },
          "change_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date on which the endorsement takes effect.",
            "trend": "seasonal"
          },
          "coverage_change": {
            "kind": "decimal",
            "min": 0,
            "max": 1000000,
            "scale": 2,
            "description": "The amount of change in coverage due to this endorsement.",
            "distribution": "long-tail"
          }
        }
      },
      "insured_items": {
        "description": "This table lists insured items that belong to each policy, linking back to the policies table and describing the items covered.",
        "rows": 250,
        "columns": {
          "item_id": {
            "kind": "pk",
            "description": "Unique identifier for each insured item."
          },
          "policy_id": {
            "kind": "fk",
            "ref": "policies.policy_id",
            "description": "Identifier linking to the policy covering this item."
          },
          "item_description": {
            "kind": "sentence",
            "min": 10,
            "max": 200,
            "description": "Description of the insured item."
          },
          "value": {
            "kind": "decimal",
            "min": 100,
            "max": 500000,
            "scale": 2,
            "description": "Monetary value of the insured item.",
            "distribution": "long-tail"
          }
        }
      },
      "clients": {
        "description": "This table contains information about clients who hold policies, providing identifiers for each client.",
        "rows": 150,
        "columns": {
          "client_id": {
            "kind": "pk",
            "description": "Unique identifier for each client."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the client."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the client."
          },
          "joined_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date when the client joined.",
            "trend": "growing"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "nullable",
      "timestamped",
      "monetary",
      "categorical"
    ],
    "analysisQuestions": [
      "How do endorsements affect the total coverage of policies over time?",
      "Which clients have the highest number of endorsements on their policies?",
      "What is the average value of insured items across all policies?",
      "How many endorsements have been issued in a given month?",
      "What is the distribution of policy statuses among clients?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Policies and Endorsements",
        "sql": "SELECT p.policy_id, p.status, e.change_date FROM policies p JOIN endorsements e ON p.policy_id = e.policy_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Endorsements by Policy",
        "sql": "SELECT policy_id, COUNT(*) as endorsement_count FROM endorsements GROUP BY policy_id;",
        "dialect": "postgres"
      },
      {
        "title": "Average Coverage Change by Policy",
        "sql": "SELECT p.policy_id, AVG(e.coverage_change) as average_coverage_change FROM policies p JOIN endorsements e ON p.policy_id = e.policy_id GROUP BY p.policy_id;",
        "dialect": "postgres"
      },
      {
        "title": "Monthly Endorsement Count",
        "sql": "SELECT DATE_TRUNC('month', change_date) AS month, COUNT(*) as endorsement_count FROM endorsements GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Insurance Underwriter Analysis",
        "body": "An insurance underwriter can use this dataset to evaluate the impact of endorsements on policy coverage. By analyzing the historical data, they can identify trends and assess risk levels associated with changes in coverage over time."
      },
      {
        "title": "Client Management Dashboard",
        "body": "A client management system can utilize this dataset to track client policies and their endorsements. It enables client service representatives to provide accurate information regarding policy changes and coverage, enhancing customer satisfaction."
      },
      {
        "title": "Educational Use in Data Science Courses",
        "body": "This dataset can serve as a teaching tool in data science courses focusing on database design and SQL. Students can practice writing complex queries to extract insights about policy changes, coverage amounts, and client demographics."
      },
      {
        "title": "Actuarial Modeling",
        "body": "Actuaries can leverage this dataset to model the effects of coverage changes on claims. By analyzing the relationship between endorsements and claims frequency, they can derive valuable insights for pricing and risk assessment."
      }
    ]
  },
  "counts": {
    "clients": 150,
    "policies": 200,
    "endorsements": 300,
    "insured_items": 250
  },
  "stats": {
    "policies": {
      "rows": 200,
      "columns": {
        "policy_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "client_id": {
          "nulls": 0,
          "distinct": 114,
          "min": 1,
          "max": 149
        },
        "effective_date": {
          "nulls": 0,
          "distinct": 187,
          "min": "2020-01-06",
          "max": "2023-12-30"
        },
        "status": {
          "nulls": 0,
          "distinct": 2,
          "min": "active",
          "max": "inactive"
        }
      }
    },
    "endorsements": {
      "rows": 300,
      "columns": {
        "endorsement_id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "policy_id": {
          "nulls": 0,
          "distinct": 155,
          "min": 1,
          "max": 200
        },
        "change_date": {
          "nulls": 0,
          "distinct": 266,
          "min": "2020-01-10",
          "max": "2023-12-28"
        },
        "coverage_change": {
          "nulls": 0,
          "distinct": 300,
          "min": 2.22,
          "max": 987324.8
        }
      }
    },
    "insured_items": {
      "rows": 250,
      "columns": {
        "item_id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "policy_id": {
          "nulls": 0,
          "distinct": 144,
          "min": 1,
          "max": 200
        },
        "item_description": {
          "nulls": 0,
          "distinct": 249
        },
        "value": {
          "nulls": 0,
          "distinct": 250,
          "min": 101.46,
          "max": 497589
        }
      }
    },
    "clients": {
      "rows": 150,
      "columns": {
        "client_id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "full_name": {
          "nulls": 0,
          "distinct": 147,
          "min": "Ana Bennett",
          "max": "Zara Lopez"
        },
        "email": {
          "nulls": 0,
          "distinct": 150
        },
        "joined_date": {
          "nulls": 0,
          "distinct": 143,
          "min": "2020-01-15",
          "max": "2023-12-24"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/clients.csv",
      "format": "csv",
      "table": "clients",
      "key": "datasets/policy-endorsements/v2/csv/clients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/csv/clients.csv",
      "bytes": 7801,
      "sha256": "41ea98e29106b82c22e2ee112127dec7d0b23a3d15dae84f4cdf7427d29047e0",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/policies.csv",
      "format": "csv",
      "table": "policies",
      "key": "datasets/policy-endorsements/v2/csv/policies.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/csv/policies.csv",
      "bytes": 5246,
      "sha256": "b5e4e3f9fec32d688625413182b55343434eb4cedfd1fddddaa2c4afd9fe6f88",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/endorsements.csv",
      "format": "csv",
      "table": "endorsements",
      "key": "datasets/policy-endorsements/v2/csv/endorsements.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/csv/endorsements.csv",
      "bytes": 8603,
      "sha256": "0dae5d1bf7b11a9eaef532ae68ef62bc2dbdfad8510ab13995c27f7e07f17a60",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/insured_items.csv",
      "format": "csv",
      "table": "insured_items",
      "key": "datasets/policy-endorsements/v2/csv/insured_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/csv/insured_items.csv",
      "bytes": 18874,
      "sha256": "2bdbf5b552a5e34c12cd8e15b784336cc9b242e2aa3dea9acdda1ca0fd2899fb",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "policy-endorsements.json",
      "format": "json",
      "table": null,
      "key": "datasets/policy-endorsements/v2/policy-endorsements.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/policy-endorsements.json",
      "bytes": 129204,
      "sha256": "869ddba6403a93bb0d4d3d359f5eb815e2a29d034b4767818791d0b804a499f1",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/policy-endorsements/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/sql/postgres.sql",
      "bytes": 53657,
      "sha256": "9d3c9fce0d169a1a16c211ca6fef89a077adfbfca25153c5ef2803763b22062f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/policy-endorsements/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/sql/mysql.sql",
      "bytes": 53144,
      "sha256": "c64b851dc8087a78b26e815f77b9c30a271238e41dc9f5f5f8f7dae1e31ef78a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/policy-endorsements/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/sql/mssql.sql",
      "bytes": 54816,
      "sha256": "349adb6a58c2425df663ebed5e832a17fde48c76c3f9e73e1c6413ac2c3f5e1e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/policy-endorsements/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/sql/sqlite.sql",
      "bytes": 52996,
      "sha256": "05d89060d601c625acac7c8c8dacfed88dda62568e95313e8d2f95232060eb44",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/policy-endorsements/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/prisma/seed.ts",
      "bytes": 106049,
      "sha256": "0bd9a9d3ff5ae2284d66851fe12553dca7f1220ca1ac3b95408b72079049d97b",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/policy-endorsements/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/policy-endorsements/v2/django/fixtures.json",
      "bytes": 162193,
      "sha256": "51d865edb5f07b5071e381070a4c97af5d4eba3cf71d5a2bd3006800e49fe882",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767916653,
  "updatedAt": 1788785526909
}
