{
  "format": "dataset-manifest/1",
  "slug": "customer-relationship-insights",
  "version": 3,
  "seed": "customer-relationship-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "customer-relationship-insights",
    "name": "Customer Relationship Insights",
    "tagline": "Customer interactions, notes, activities, and sales orders detailing engagement across marketing campaigns and leads.",
    "description": "Businesses thrive on understanding their customer relationships and optimizing their outreach efforts. This dataset focuses on leads, accounts, opportunities, and campaigns, detailing interactions across various channels. Each row in the table represents a unique interaction with a customer, including valuable data on customer notes, activities, and sales orders. This information helps to reveal clusters of high engagement around specific campaigns, while also highlighting the challenges of lead conversions, which can be relatively rare. By analyzing this synthetic dataset, marketers can gain key insights for strategic improvements, identify successful outreach strategies, and refine their customer engagement practices. The dataset is designed for SQL practice and ORM seeding, making it ideal for developers and data analysts looking to hone their skills and build applications that leverage customer relationship data.",
    "domain": "marketing",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "customer relationship",
      "marketing",
      "leads",
      "opportunities",
      "campaigns",
      "sales orders",
      "data analysis"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customer_interactions": {
        "description": "Each row represents a unique interaction with a customer, linking to leads, accounts, opportunities, and campaigns.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each interaction."
          },
          "lead_id": {
            "kind": "fk",
            "ref": "customer_interactions.id",
            "nullable": true,
            "description": "Identifier for the lead associated with this interaction."
          },
          "account_id": {
            "kind": "fk",
            "ref": "customer_interactions.id",
            "nullable": true,
            "description": "Identifier for the account associated with this interaction."
          },
          "opportunity_id": {
            "kind": "fk",
            "ref": "customer_interactions.id",
            "nullable": true,
            "description": "Identifier for the opportunity associated with this interaction."
          },
          "campaign_id": {
            "kind": "fk",
            "ref": "customer_interactions.id",
            "nullable": true,
            "description": "Identifier for the campaign associated with this interaction."
          },
          "interaction_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date and time of the interaction.",
            "dayProfile": "waking"
          },
          "channel": {
            "kind": "enum",
            "values": [
              "email",
              "phone",
              "social_media",
              "in_person",
              "webinar"
            ],
            "description": "The channel through which the interaction occurred.",
            "weights": [
              6,
              4,
              3,
              2,
              1
            ]
          },
          "notes": {
            "kind": "sentence",
            "description": "Notes regarding the interaction."
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "completed",
              "follow_up",
              "lost"
            ],
            "description": "Current status of the interaction.",
            "weights": [
              5,
              7,
              2,
              1
            ]
          },
          "sales_order_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 10000,
            "scale": 2,
            "nullable": true,
            "description": "Total amount of the sales order associated with the interaction, if applicable.",
            "distribution": "long-tail"
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "free-text",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What are the most common channels used for customer interactions?",
      "Which campaigns have the highest engagement rates?",
      "How does the conversion rate vary across different statuses?",
      "What patterns can be observed in sales order amounts based on interaction dates?",
      "Which types of interactions lead to successful conversions?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all completed interactions",
        "sql": "SELECT * FROM customer_interactions WHERE status = 'completed';",
        "dialect": "postgres"
      },
      {
        "title": "Count interactions by channel",
        "sql": "SELECT channel, COUNT(*) FROM customer_interactions GROUP BY channel;",
        "dialect": "postgres"
      },
      {
        "title": "Average sales order amount per campaign",
        "sql": "SELECT campaign_id, AVG(sales_order_amount) FROM customer_interactions WHERE sales_order_amount IS NOT NULL GROUP BY campaign_id;",
        "dialect": "postgres"
      },
      {
        "title": "Find interactions in the last month",
        "sql": "SELECT * FROM customer_interactions WHERE interaction_date >= NOW() - INTERVAL '30 days';",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Data Analysis for Marketing Teams",
        "body": "Marketing teams can use this dataset to analyze customer interactions and optimize their outreach strategies. By examining the effectiveness of different channels and campaigns, they can identify trends that lead to higher engagement and conversion rates."
      },
      {
        "title": "Training and Development for Data Analysts",
        "body": "This dataset serves as an excellent resource for training aspiring data analysts. They can practice SQL queries and data manipulation techniques on real-world-like scenarios, learning how to extract meaningful insights from customer relationship data."
      },
      {
        "title": "CRM System Testing",
        "body": "Developers building customer relationship management systems can utilize this dataset as a testing fixture. By seeding their databases with realistic customer interaction data, they can ensure their applications handle various scenarios effectively and efficiently."
      }
    ]
  },
  "counts": {
    "customer_interactions": 500
  },
  "stats": {
    "customer_interactions": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "lead_id": {
          "nulls": 63,
          "distinct": 231,
          "min": 1,
          "max": 486
        },
        "account_id": {
          "nulls": 62,
          "distinct": 228,
          "min": 1,
          "max": 448
        },
        "opportunity_id": {
          "nulls": 43,
          "distinct": 239,
          "min": 1,
          "max": 476
        },
        "campaign_id": {
          "nulls": 52,
          "distinct": 236,
          "min": 1,
          "max": 488
        },
        "interaction_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2022-01-01 19:53:53",
          "max": "2023-12-31 14:41:21"
        },
        "channel": {
          "nulls": 0,
          "distinct": 5,
          "min": "email",
          "max": "webinar"
        },
        "notes": {
          "nulls": 0,
          "distinct": 497
        },
        "status": {
          "nulls": 0,
          "distinct": 4,
          "min": "completed",
          "max": "pending"
        },
        "sales_order_amount": {
          "nulls": 46,
          "distinct": 454,
          "min": 0.02,
          "max": 9999.92
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customer_interactions.csv",
      "format": "csv",
      "table": "customer_interactions",
      "key": "datasets/customer-relationship-insights/v3/csv/customer_interactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/csv/customer_interactions.csv",
      "bytes": 59015,
      "sha256": "a72993615ce6991fc42a20a1dd3afe48b378351cf1e9566854956495002cec79",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "customer-relationship-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/customer-relationship-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/customer-relationship-insights.json",
      "bytes": 172217,
      "sha256": "6a8e5dcbb87dd4bba5e9fb8761dec2fac1031877bc64056a38c765416581eaf5",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/sql/postgres.sql",
      "bytes": 73269,
      "sha256": "7522cf5b711613eed7d48c144f8cb1b6402584075c8152c159594a1aaf5988f3",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/sql/mysql.sql",
      "bytes": 73127,
      "sha256": "7a4948f00f43cd92975182c1152a7b984585ea6d978c382f753fd0c25966a864",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/sql/mssql.sql",
      "bytes": 75226,
      "sha256": "c3b2b64b575913a637a966c212d6c7931d816a37189641b048f8434d286d0614",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/sql/sqlite.sql",
      "bytes": 72886,
      "sha256": "f9a7c2644c57445953df56a48e26791b1c77e7046c0de29d52427a9bd664d095",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/prisma/seed.ts",
      "bytes": 141448,
      "sha256": "4b6ad5f303a166801704773c975cec3d6697b82a20e308e0f8e83d7b6d16221f",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/customer-relationship-insights/v3/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-insights/v3/django/fixtures.json",
      "bytes": 195673,
      "sha256": "0929a3e822793684e09ba433704c8d9a2f38ecac0c130a645896f52fc88d034e",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768259970,
  "updatedAt": 1788783233162
}
