{
  "format": "dataset-manifest/1",
  "slug": "customer-relationship-management-crm",
  "version": 1,
  "seed": "customer-relationship-management-crm:1",
  "spec": {
    "format": "dataset/1",
    "slug": "customer-relationship-management-crm",
    "name": "Customer Engagement Insights",
    "tagline": "Accounts, sales deals, interactions, quotes, invoices, and ticket priorities from a marketing consultancy.",
    "description": "Accounts are managed by the marketing consultancy, which works diligently to optimize outreach strategies and enhance client relationships. Each account is linked to multiple interactions, where representatives log meetings and communications that detail client engagement. As these relationships progress, various sales deals are tracked, each representing stages of potential revenue generation. Quotes derived from these deals indicate the estimated value of services offered, while invoices reflect the finalized transactions once agreements are made. Additionally, ticket priorities are assigned to assist in managing customer inquiries and ensuring prompt responses to client needs.\n\nIn this framework, a single row in the accounts table corresponds to a specific client, while the interactions table includes multiple entries tied to each account, depicting the frequency and nature of communications. The sales_deals table tracks the progress of potential revenue opportunities for each account, with quotes indicating the value that could be realized should the negotiations succeed. Invoices are created once deals are finalized, and the ticket_priorities table highlights how urgent different client queries are prioritized based on their importance and impact.\n\nThis dataset serves as a resource for exploring how customer engagement influences sales outcomes. Developers and analysts can practice analyzing the flow of interactions leading to successful invoices and understand the correlations between account activity, deal progression, and client engagement strategies. Questions such as how interaction frequency affects deal closure rates or how ticket priorities impact customer satisfaction can be explored. Synthetic in nature, the data provides a safe environment for manipulating and querying without real-world implications.",
    "domain": "marketing",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "customer engagement",
      "marketing",
      "sales tracking",
      "quotes",
      "invoices",
      "client interactions"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "accounts": {
        "description": "A table representing customer accounts, linking to sales deals. Each account can have multiple deals associated with it.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each account."
          },
          "account_name": {
            "kind": "words",
            "max": 5,
            "description": "Name of the customer account.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "Date the account was created.",
            "dayProfile": "business"
          }
        }
      },
      "sales_deals": {
        "description": "Tracks various sales opportunities for each account, linking back to the accounts table.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each sales deal."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "Reference to the associated account."
          },
          "deal_stage": {
            "kind": "enum",
            "values": [
              "prospecting",
              "negotiation",
              "closed_won",
              "closed_lost"
            ],
            "description": "Current stage of the sales deal."
          },
          "expected_close_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Expected date to close the deal.",
            "nullable": true,
            "when": {
              "column": "deal_stage",
              "in": [
                "prospecting",
                "negotiation"
              ]
            }
          }
        }
      },
      "interactions": {
        "description": "Logs interactions with clients, allowing for analysis of engagement frequency. Linked to sales deals.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each interaction."
          },
          "deal_id": {
            "kind": "fk",
            "ref": "sales_deals.id",
            "description": "Reference to the associated sales deal."
          },
          "interaction_type": {
            "kind": "enum",
            "values": [
              "call",
              "email",
              "meeting"
            ],
            "description": "Type of interaction."
          },
          "interaction_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date of the interaction.",
            "nullable": true,
            "when": {
              "column": "interaction_type",
              "in": [
                "call",
                "email"
              ]
            },
            "dayProfile": "waking"
          }
        }
      },
      "quotes": {
        "description": "Captures quotes provided to clients, linked to sales deals. High-value quotes are less frequent.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each quote."
          },
          "deal_id": {
            "kind": "fk",
            "ref": "sales_deals.id",
            "description": "Reference to the associated sales deal."
          },
          "quote_value": {
            "kind": "decimal",
            "min": 100,
            "max": 10000,
            "scale": 2,
            "description": "Value of the quote.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the quote was created.",
            "dayProfile": "business"
          }
        }
      },
      "invoices": {
        "description": "Records invoices generated for closed sales deals. Linked to sales deals and accounts.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each invoice."
          },
          "deal_id": {
            "kind": "fk",
            "ref": "sales_deals.id",
            "description": "Reference to the associated sales deal."
          },
          "amount": {
            "kind": "decimal",
            "min": 50,
            "max": 5000,
            "scale": 2,
            "description": "Total invoice amount.",
            "nullable": true
          },
          "invoice_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the invoice was issued.",
            "nullable": true
          }
        }
      },
      "ticket_priorities": {
        "description": "Manages priority levels for customer support tickets, linked to accounts.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each ticket priority."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "Reference to the associated account."
          },
          "priority_level": {
            "kind": "enum",
            "values": [
              "low",
              "medium",
              "high"
            ],
            "description": "Priority level of the support ticket."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the ticket priority was created.",
            "nullable": true,
            "when": {
              "column": "priority_level",
              "in": [
                "medium",
                "high"
              ]
            },
            "dayProfile": "business"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average deal size for each account?",
      "Which types of interactions correlate with closed deals?",
      "How do different lead sources impact sales outcomes?",
      "What is the distribution of quote values across different accounts?",
      "How does ticket priority affect response times?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Accounts and Sales Deals",
        "sql": "SELECT accounts.account_name, sales_deals.deal_stage FROM accounts JOIN sales_deals ON accounts.id = sales_deals.account_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Interactions by Deal Stage",
        "sql": "SELECT sales_deals.deal_stage, COUNT(interactions.id) AS interaction_count FROM sales_deals LEFT JOIN interactions ON sales_deals.id = interactions.deal_id GROUP BY sales_deals.deal_stage;",
        "dialect": "postgres"
      },
      {
        "title": "Average Quote Value by Account",
        "sql": "SELECT accounts.account_name, AVG(quotes.quote_value) AS average_quote FROM accounts JOIN sales_deals ON accounts.id = sales_deals.account_id JOIN quotes ON sales_deals.id = quotes.deal_id GROUP BY accounts.account_name;",
        "dialect": "postgres"
      },
      {
        "title": "Invoices Total Amount per Account",
        "sql": "SELECT accounts.account_name, SUM(invoices.amount) AS total_invoiced FROM accounts JOIN sales_deals ON accounts.id = sales_deals.account_id JOIN invoices ON sales_deals.id = invoices.deal_id GROUP BY accounts.account_name;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Sales Team Performance Review",
        "body": "A sales manager can utilize this dataset to analyze the performance of their sales team by examining the conversion rates of leads to closed deals. By analyzing interactions and quotes, they can identify which strategies lead to higher success rates and adjust training or coaching accordingly."
      },
      {
        "title": "Marketing Campaign Analysis",
        "body": "A marketing analyst can use this dataset to evaluate the effectiveness of different lead sources. By correlating sales outcomes with interaction types, they can determine which campaigns drive the most revenue and optimize future marketing strategies based on these insights."
      },
      {
        "title": "Customer Support Optimization",
        "body": "A customer support manager can leverage this dataset to assess the urgency of ticket priorities assigned to different accounts. By analyzing response times and resolution rates, they can implement changes to improve customer satisfaction and streamline support processes."
      }
    ]
  },
  "counts": {
    "accounts": 200,
    "sales_deals": 300,
    "interactions": 400,
    "invoices": 250,
    "quotes": 150,
    "ticket_priorities": 100
  },
  "stats": {
    "accounts": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "account_name": {
          "nulls": 20,
          "distinct": 180
        },
        "created_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2020-01-07 11:59:56",
          "max": "2022-12-24 11:29:46"
        }
      }
    },
    "sales_deals": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "account_id": {
          "nulls": 0,
          "distinct": 152,
          "min": 2,
          "max": 199
        },
        "deal_stage": {
          "nulls": 0,
          "distinct": 4,
          "min": "closed_lost",
          "max": "prospecting"
        },
        "expected_close_date": {
          "nulls": 135,
          "distinct": 136,
          "min": "2023-01-02",
          "max": "2023-12-31"
        }
      }
    },
    "interactions": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "deal_id": {
          "nulls": 0,
          "distinct": 220,
          "min": 1,
          "max": 300
        },
        "interaction_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "call",
          "max": "meeting"
        },
        "interaction_date": {
          "nulls": 132,
          "distinct": 268,
          "min": "2023-01-01 18:35:45",
          "max": "2023-12-31 11:07:39"
        }
      }
    },
    "quotes": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "deal_id": {
          "nulls": 0,
          "distinct": 115,
          "min": 4,
          "max": 292
        },
        "quote_value": {
          "nulls": 16,
          "distinct": 134,
          "min": 144.28,
          "max": 9987.4
        },
        "created_at": {
          "nulls": 0,
          "distinct": 150,
          "min": "2023-01-04 11:21:22",
          "max": "2023-12-31 08:42:12"
        }
      }
    },
    "invoices": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "deal_id": {
          "nulls": 0,
          "distinct": 163,
          "min": 1,
          "max": 300
        },
        "amount": {
          "nulls": 27,
          "distinct": 223,
          "min": 89.56,
          "max": 4945.45
        },
        "invoice_date": {
          "nulls": 33,
          "distinct": 164,
          "min": "2023-01-06",
          "max": "2023-12-28"
        }
      }
    },
    "ticket_priorities": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "account_id": {
          "nulls": 0,
          "distinct": 73,
          "min": 3,
          "max": 199
        },
        "priority_level": {
          "nulls": 0,
          "distinct": 3,
          "min": "high",
          "max": "medium"
        },
        "created_at": {
          "nulls": 43,
          "distinct": 57,
          "min": "2023-01-07 14:06:14",
          "max": "2023-12-15 11:19:24"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/accounts.csv",
      "format": "csv",
      "table": "accounts",
      "key": "datasets/customer-relationship-management-crm/v1/csv/accounts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/accounts.csv",
      "bytes": 9265,
      "sha256": "d7dcac77d28996fe838b47f8df789ea78c5e693a0614107fd138de7114101e49",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sales_deals.csv",
      "format": "csv",
      "table": "sales_deals",
      "key": "datasets/customer-relationship-management-crm/v1/csv/sales_deals.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/sales_deals.csv",
      "bytes": 7964,
      "sha256": "cd0b3f6b0b28f95af1ebc1128f7b6ca2f3658d4828341cca2e43f4a4b21c2ca7",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/interactions.csv",
      "format": "csv",
      "table": "interactions",
      "key": "datasets/customer-relationship-management-crm/v1/csv/interactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/interactions.csv",
      "bytes": 11433,
      "sha256": "daa2a8399bc9f18c9a6f51032445f23abee751df87032c3ad04331a57919ac30",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/invoices.csv",
      "format": "csv",
      "table": "invoices",
      "key": "datasets/customer-relationship-management-crm/v1/csv/invoices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/invoices.csv",
      "bytes": 6268,
      "sha256": "89ef78affd7f8b882c93cc097f3339bcd9b1d59110880ef20db3216c3e3ff9f1",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/quotes.csv",
      "format": "csv",
      "table": "quotes",
      "key": "datasets/customer-relationship-management-crm/v1/csv/quotes.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/quotes.csv",
      "bytes": 5307,
      "sha256": "741bce5f1eb9ffae47cbad517f47f53f7534d09c7068104a8eb45887ab91c26a",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/ticket_priorities.csv",
      "format": "csv",
      "table": "ticket_priorities",
      "key": "datasets/customer-relationship-management-crm/v1/csv/ticket_priorities.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/csv/ticket_priorities.csv",
      "bytes": 2485,
      "sha256": "720993248e6ac8996b4c8169df552fc92e078b211251a5e471f6fe37d0bca294",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "customer-relationship-management-crm.json",
      "format": "json",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/customer-relationship-management-crm.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/customer-relationship-management-crm.json",
      "bytes": 171428,
      "sha256": "5b10efc29b0c4cfbdd437ad94b4804cb4558088fbdefaf07ac5c7bf45186e8c6",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/sql/postgres.sql",
      "bytes": 64030,
      "sha256": "9130c66637cbf825c86072966fff020a3119817e2655b5ed066793487b6d474f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/sql/mysql.sql",
      "bytes": 63339,
      "sha256": "e1d516841430302841347037d185142339f4f14098b1a174491e18416edff573",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/sql/mssql.sql",
      "bytes": 65778,
      "sha256": "85cb756b4d45dde32c9ce9cfc6a819be3c35028f54e3d9d45069db7a938bd336",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/sql/sqlite.sql",
      "bytes": 63105,
      "sha256": "3555f41e2f23a953df844d876e1635b7c85255d433fdc932074b84d6bcb67285",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/prisma/seed.ts",
      "bytes": 143021,
      "sha256": "cfbf11a84ef9ec20a2c5c0629c626c7798a6a84c1423c4d08348ed8789d39ab6",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/customer-relationship-management-crm/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/customer-relationship-management-crm/v1/django/fixtures.json",
      "bytes": 233334,
      "sha256": "6014865a3a4a33bca6de7da94b20ac66d4cb435ee5b1e804217bf28abb4927e6",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767688783,
  "updatedAt": 1788767688783
}
