{
  "format": "dataset-manifest/1",
  "slug": "support-tickets",
  "version": 1,
  "seed": "support-tickets:1",
  "spec": {
    "format": "dataset/1",
    "slug": "support-tickets",
    "name": "Support Tickets",
    "tagline": "Support tickets, customer interactions, agent responses, and satisfaction scores from a help desk system.",
    "description": "Customers submit support tickets to seek assistance with various issues they encounter. Agents on dedicated teams monitor these requests, prioritize them based on urgency, and work collaboratively to resolve them. Each ticket is tracked throughout its lifecycle, from submission to resolution, ensuring that customers receive timely and effective support. The help desk accumulates detailed records of tickets, including their statuses, associated replies, and the tags that categorize the issues for better analysis. After closing a ticket, customers are prompted to provide satisfaction scores, which serve as valuable feedback for the agents and the business as a whole.\n\nThe data structure consists of several interconnected tables: the 'customers' table holds unique identifiers for each customer and their basic information. The 'agents' table features details about the support personnel managing the tickets. Each entry in the 'tickets' table represents a single support request, linking to both the customer who submitted it and the agent assigned to assist. The 'replies' table documents all communication related to each ticket, allowing for a complete conversation history. Additionally, the 'tags' table organizes issues into categories, facilitating easier tracking and reporting. Finally, the 'satisfaction_scores' table captures customer feedback on their experience, tied directly to each closed ticket.\n\nThis dataset is ideal for developers looking to practice data analysis and reporting techniques in a customer support context. Questions that can be answered include: How responsive are agents to incoming tickets? What are the most common issues faced by customers? What factors contribute to higher satisfaction scores? By exploring these relationships, users can gain insights into operational efficiency and customer experience. The data is synthetic, crafted to mimic real-world scenarios, providing a safe environment for experimentation and learning.",
    "domain": "customer-support",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "bi-dashboards"
    ],
    "keywords": [
      "customer support",
      "tickets",
      "agents",
      "satisfaction",
      "replies",
      "tags"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "Each row represents a customer who has submitted support tickets. It includes personal information for identification.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the customer."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "The email address of the customer."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date when the customer was created.",
            "dayProfile": "waking"
          }
        }
      },
      "agents": {
        "description": "This table represents support agents assigned to assist with tickets. Each agent belongs to a team.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each agent."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the agent."
          },
          "team": {
            "kind": "enum",
            "values": [
              "Technical",
              "Billing",
              "General",
              "Sales"
            ],
            "description": "The team to which the agent belongs."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "The email address of the agent."
          }
        }
      },
      "tickets": {
        "description": "Each row corresponds to a support ticket created by a customer. It links to both the customer and the agent handling the ticket.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each ticket."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "Reference to the customer who created the ticket."
          },
          "agent_id": {
            "kind": "fk",
            "ref": "agents.id",
            "nullable": true,
            "description": "Reference to the agent assigned to the ticket."
          },
          "status": {
            "kind": "enum",
            "values": [
              "Open",
              "In Progress",
              "Closed"
            ],
            "description": "Current status of the ticket."
          },
          "priority": {
            "kind": "enum",
            "values": [
              "Low",
              "Medium",
              "High"
            ],
            "description": "Priority level of the ticket."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date when the ticket was created.",
            "dayProfile": "waking",
            "trend": "growing"
          }
        }
      },
      "replies": {
        "description": "This table records all replies made by agents to customers regarding their tickets, including timestamps.",
        "rows": 1000,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each reply."
          },
          "ticket_id": {
            "kind": "fk",
            "ref": "tickets.id",
            "description": "Reference to the ticket related to the reply."
          },
          "agent_id": {
            "kind": "fk",
            "ref": "agents.id",
            "description": "Reference to the agent who made the reply."
          },
          "reply_text": {
            "kind": "sentence",
            "max": 250,
            "description": "The content of the agent's reply."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date when the reply was made.",
            "dayProfile": "waking"
          }
        }
      },
      "tags": {
        "description": "Tags assigned to tickets for categorization purposes. Allows for better filtering and reporting.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each tag."
          },
          "ticket_id": {
            "kind": "fk",
            "ref": "tickets.id",
            "description": "Reference to the ticket associated with the tag."
          },
          "tag": {
            "kind": "sentence",
            "max": 50,
            "description": "The name of the tag."
          }
        }
      },
      "satisfaction_scores": {
        "description": "This table contains customer satisfaction scores for closed tickets, providing valuable feedback on the support experience.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each satisfaction score entry."
          },
          "ticket_id": {
            "kind": "fk",
            "ref": "tickets.id",
            "description": "Reference to the closed ticket being scored."
          },
          "score": {
            "kind": "int",
            "min": 1,
            "max": 5,
            "description": "The satisfaction score given by the customer."
          },
          "comment": {
            "kind": "sentence",
            "max": 250,
            "nullable": true,
            "description": "Optional feedback from the customer."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date when the satisfaction score was recorded.",
            "dayProfile": "waking"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average satisfaction score for closed tickets?",
      "Which agents have the highest number of resolved tickets?",
      "What are the most common ticket priorities and their statuses?",
      "How does response time vary by ticket priority?",
      "Which tags are most frequently assigned to tickets?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all tickets with their customer and agent details",
        "sql": "SELECT tickets.id, customers.full_name AS customer_name, agents.full_name AS agent_name FROM tickets JOIN customers ON tickets.customer_id = customers.id LEFT JOIN agents ON tickets.agent_id = agents.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count tickets by status and priority",
        "sql": "SELECT status, priority, COUNT(*) FROM tickets GROUP BY status, priority;",
        "dialect": "postgres"
      },
      {
        "title": "Average satisfaction score by agent",
        "sql": "SELECT agents.full_name, AVG(satisfaction_scores.score) FROM satisfaction_scores JOIN tickets ON satisfaction_scores.ticket_id = tickets.id JOIN agents ON tickets.agent_id = agents.id GROUP BY agents.full_name;",
        "dialect": "postgres"
      },
      {
        "title": "Get replies for a specific ticket",
        "sql": "SELECT replies.reply_text, replies.created_at, agents.full_name AS agent_name FROM replies JOIN agents ON replies.agent_id = agents.id WHERE replies.ticket_id = $1;",
        "dialect": "postgres"
      },
      {
        "title": "Find the most common tags assigned to tickets",
        "sql": "SELECT tag, COUNT(*) FROM tags GROUP BY tag ORDER BY COUNT(*) DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Customer Support Analysis",
        "body": "Customer support managers can utilize this dataset to analyze ticket resolution times, agent performance, and customer satisfaction levels. By examining trends in ticket statuses and priorities, they can identify areas needing improvement and optimize support workflows."
      },
      {
        "title": "Training and Development",
        "body": "Training teams can use this dataset for developing training programs for new support agents. By simulating real-life scenarios using the tickets, replies, and satisfaction scores, they can enhance agents' skills and improve customer interactions."
      },
      {
        "title": "Business Intelligence Dashboards",
        "body": "Business analysts can leverage the dataset for creating BI dashboards that visualize ticket volumes, agent performance metrics, and customer satisfaction trends over time. This enables data-driven decisions to enhance the customer support experience."
      },
      {
        "title": "Query Performance Testing",
        "body": "Developers can use this dataset to test and benchmark their SQL query performance. By running various types of queries on the tables, they can identify optimization opportunities and improve the efficiency of their database systems."
      }
    ]
  },
  "counts": {
    "agents": 50,
    "customers": 200,
    "tickets": 500,
    "replies": 1000,
    "satisfaction_scores": 400,
    "tags": 300
  },
  "stats": {
    "customers": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 195,
          "min": "Alice Cruz",
          "max": "Zara Torres"
        },
        "email": {
          "nulls": 0,
          "distinct": 198
        },
        "created_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2020-01-01 23:31:00",
          "max": "2022-12-29 13:25:15"
        }
      }
    },
    "agents": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "full_name": {
          "nulls": 0,
          "distinct": 50,
          "min": "Amir Murphy",
          "max": "Yusuf Baker"
        },
        "team": {
          "nulls": 0,
          "distinct": 4,
          "min": "Billing",
          "max": "Technical"
        },
        "email": {
          "nulls": 0,
          "distinct": 50
        }
      }
    },
    "tickets": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 183,
          "min": 1,
          "max": 200
        },
        "agent_id": {
          "nulls": 54,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "Closed",
          "max": "Open"
        },
        "priority": {
          "nulls": 0,
          "distinct": 3,
          "min": "High",
          "max": "Medium"
        },
        "created_at": {
          "nulls": 0,
          "distinct": 500,
          "min": "2023-01-01 23:42:41",
          "max": "2023-12-31 21:47:26"
        }
      }
    },
    "replies": {
      "rows": 1000,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 1000,
          "min": 1,
          "max": 1000
        },
        "ticket_id": {
          "nulls": 0,
          "distinct": 440,
          "min": 1,
          "max": 500
        },
        "agent_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "reply_text": {
          "nulls": 0,
          "distinct": 984
        },
        "created_at": {
          "nulls": 0,
          "distinct": 1000,
          "min": "2023-01-01 04:59:57",
          "max": "2023-12-31 18:20:51"
        }
      }
    },
    "tags": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "ticket_id": {
          "nulls": 0,
          "distinct": 224,
          "min": 2,
          "max": 500
        },
        "tag": {
          "nulls": 0,
          "distinct": 297
        }
      }
    },
    "satisfaction_scores": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "ticket_id": {
          "nulls": 0,
          "distinct": 269,
          "min": 1,
          "max": 500
        },
        "score": {
          "nulls": 0,
          "distinct": 5,
          "min": 1,
          "max": 5
        },
        "comment": {
          "nulls": 34,
          "distinct": 361
        },
        "created_at": {
          "nulls": 0,
          "distinct": 400,
          "min": "2023-01-02 00:30:17",
          "max": "2023-12-31 22:27:52"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/agents.csv",
      "format": "csv",
      "table": "agents",
      "key": "datasets/support-tickets/v1/csv/agents.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/agents.csv",
      "bytes": 2440,
      "sha256": "2e44cbc26d26ce2e2f096ff4e5f59bf0d3fa1e139569643e23058a4e702ba231",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/support-tickets/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/customers.csv",
      "bytes": 12143,
      "sha256": "cee3e8bdf4ca14d40f7e4627fa1f10ba020fe7e0c8f1d01849f74d64217bd647",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/tickets.csv",
      "format": "csv",
      "table": "tickets",
      "key": "datasets/support-tickets/v1/csv/tickets.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/tickets.csv",
      "bytes": 22158,
      "sha256": "a4718b699bc81f28b0a7106e5ba7bd1b0868867322e205837578218f40e0b2b1",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/replies.csv",
      "format": "csv",
      "table": "replies",
      "key": "datasets/support-tickets/v1/csv/replies.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/replies.csv",
      "bytes": 87874,
      "sha256": "1e8cbe6ef007d6ba80583d3c1363a4f6427e739ae21315f002aaaa24bb144658",
      "rows": 1000,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/satisfaction_scores.csv",
      "format": "csv",
      "table": "satisfaction_scores",
      "key": "datasets/support-tickets/v1/csv/satisfaction_scores.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/satisfaction_scores.csv",
      "bytes": 33079,
      "sha256": "933ec325463349cfeda0d5afa8d35712021e4e9840d7d3abf4d436cda2f9b8ba",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/tags.csv",
      "format": "csv",
      "table": "tags",
      "key": "datasets/support-tickets/v1/csv/tags.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/csv/tags.csv",
      "bytes": 19293,
      "sha256": "58d8df5d00961f360bde72ef9125c06e536fad48b2be79d75b39c4e45bd8c845",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "support-tickets.json",
      "format": "json",
      "table": null,
      "key": "datasets/support-tickets/v1/support-tickets.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/support-tickets.json",
      "bytes": 430142,
      "sha256": "c8adbb812a91b14971d7bf90d36ebbfe27137a5a784251d96174191f6b1393f3",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/support-tickets/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/sql/postgres.sql",
      "bytes": 215210,
      "sha256": "77b13754284e2867c71adb2ccfcc7b2ee0c2e2522a388f1dcecde0feb5c28b3f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/support-tickets/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/sql/mysql.sql",
      "bytes": 214531,
      "sha256": "e59da4e746b797ef8d85273ce980f40ceff01ec0c975267e2e6154c77563fd80",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/support-tickets/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/sql/mssql.sql",
      "bytes": 220259,
      "sha256": "887d00467572021bde9f24434f240cdec5c76c23226dce745f08bdc9f3548274",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/support-tickets/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/sql/sqlite.sql",
      "bytes": 214270,
      "sha256": "ede676666baba2d686990a5f83757b985b27decbae54713ccf7a718843835beb",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/support-tickets/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/prisma/seed.ts",
      "bytes": 368882,
      "sha256": "0b2241536b284c6217a4e66412b917e38c93449c9051982acf86fb579d6dc99b",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/support-tickets/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/support-tickets/v1/django/fixtures.json",
      "bytes": 529218,
      "sha256": "1abc3bf83e4db324f9948f266204382e277055db1e59b23ffa8e6526f3dfb6d7",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788765933597,
  "updatedAt": 1788765933597
}
