{
  "format": "dataset-manifest/1",
  "slug": "intercity-bus-ticket-app",
  "version": 3,
  "seed": "intercity-bus-ticket-app:1",
  "engine": 1,
  "engineVersion": "1.0.0",
  "spec": {
    "format": "dataset/1",
    "slug": "intercity-bus-ticket-app",
    "name": "Intercity Travel Insights",
    "tagline": "User transactions, selected routes, payments, and coupons for intercity bus ticket bookings.",
    "description": "Travelers book intercity bus tickets through a digital platform, actively comparing routes, checking seat availability, and managing payments. Each user journey reflects their transaction history, including selected routes, payment methods, and any discounts obtained through coupons. Users often exhibit distinct behaviors; while many finalize their bookings swiftly, a percentage invest more time reconsidering their options, contributing to observable trends in journey selection and preferences for payment methods.\n\nThe dataset features several interrelated tables: the 'users' table contains information about the travelers who utilize the platform, including unique identifiers and demographic data. The 'journeys' table records each trip booked, detailing the selected routes and associated users. The 'payments' table captures data on payment transactions, including methods and amounts. Additionally, the 'coupons' table lists available discounts, while the 'applied_coupons' table associates specific coupons with individual transactions. One row in the 'users' table corresponds to a unique traveler, while each row in 'journeys' represents a specific ticket booking linked to that user. The 'payments' table connects to both 'journeys' and 'users', as payments are made against booked journeys by users.\n\nThis dataset enables users to explore questions related to booking behavior, such as which routes are most popular, how often users apply coupons, and what payment methods are most frequently used. It serves as a valuable resource for practice in data analysis, allowing developers to experiment with techniques in user behavior analysis, transaction patterns, and discount effectiveness. The data is synthetic, designed for testing and developing analytical skills without real-world implications.",
    "domain": "customer-support",
    "shape": "event-log",
    "useCases": [
      "analytics-demo",
      "etl-pipelines"
    ],
    "keywords": [
      "travel",
      "bus tickets",
      "user behavior",
      "booking",
      "payments",
      "coupons",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table contains records of users who have registered on the platform. Each user has a unique identifier and associated details.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the user.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "User's email address.",
            "nullable": true
          },
          "registration_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the user registered.",
            "dayProfile": "waking",
            "trend": "growing"
          }
        }
      },
      "journeys": {
        "description": "This table records the journeys available for booking, linking to the users who made the bookings and the payment transactions.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each journey."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "Foreign key linking to the user who booked the journey."
          },
          "route": {
            "kind": "words",
            "description": "Description of the bus route.",
            "nullable": true,
            "pool": [
              "city",
              "express",
              "central",
              "north",
              "south",
              "east",
              "west",
              "line",
              "route",
              "service",
              "stop",
              "terminal",
              "transfer",
              "schedule",
              "departure",
              "arrival",
              "station",
              "link",
              "travel",
              "bus",
              "path"
            ],
            "min": 2,
            "max": 5
          },
          "departure_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Departure time of the journey.",
            "dayProfile": "waking"
          },
          "seat_count": {
            "kind": "int",
            "min": 1,
            "max": 60,
            "description": "Number of seats booked for this journey.",
            "nullable": true
          }
        }
      },
      "payments": {
        "description": "This table logs the payment transactions for bookings made by users, including payment methods used.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each payment transaction."
          },
          "journey_id": {
            "kind": "fk",
            "ref": "journeys.id",
            "description": "Foreign key linking to the journey for which the payment was made."
          },
          "payment_method": {
            "kind": "enum",
            "values": [
              "credit_card",
              "debit_card",
              "paypal",
              "bank_transfer"
            ],
            "description": "Method used for payment.",
            "weights": [
              6,
              4,
              2,
              1
            ]
          },
          "amount": {
            "kind": "decimal",
            "min": 5,
            "max": 150,
            "scale": 2,
            "description": "Total amount paid for the journey.",
            "nullable": true,
            "distribution": "long-tail"
          },
          "payment_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the payment was made.",
            "dayProfile": "business"
          }
        }
      },
      "coupons": {
        "description": "This table contains information about discount coupons applied during the booking process.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each coupon."
          },
          "code": {
            "kind": "words",
            "description": "Unique code for the coupon.",
            "pool": [
              "SAVE",
              "DISCOUNT",
              "OFFER",
              "PROMO",
              "DEAL",
              "CODE",
              "VALUE",
              "PASS",
              "TICKET",
              "VOUCHER",
              "BONUS",
              "GIFT",
              "SPECIAL",
              "LIMITED",
              "EXTRA",
              "REWARD",
              "FLASH",
              "FLASHSALE",
              "FREESHIP",
              "SUMMER",
              "WINTER"
            ],
            "min": 1,
            "max": 3
          },
          "discount_percentage": {
            "kind": "int",
            "min": 5,
            "max": 50,
            "description": "Percentage discount offered by the coupon.",
            "nullable": true,
            "distribution": "normal"
          },
          "valid_from": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Start date for coupon validity.",
            "nullable": true,
            "trend": "seasonal"
          },
          "valid_until": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "End date for coupon validity.",
            "nullable": true,
            "trend": "seasonal"
          }
        }
      },
      "applied_coupons": {
        "description": "This table links coupons to the payments they were applied to, indicating which discounts were used by users.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each applied coupon record."
          },
          "payment_id": {
            "kind": "fk",
            "ref": "payments.id",
            "description": "Foreign key linking to the payment where the coupon was applied."
          },
          "coupon_id": {
            "kind": "fk",
            "ref": "coupons.id",
            "description": "Foreign key linking to the coupon that was applied."
          },
          "applied_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the coupon was applied to the payment."
          },
          "discount_amount": {
            "kind": "decimal",
            "min": 0.5,
            "max": 75,
            "distribution": "long-tail",
            "description": "Amount deducted from the payment due to the coupon."
          },
          "payment_method": {
            "kind": "enum",
            "values": [
              "credit_card",
              "debit_card",
              "paypal",
              "bank_transfer"
            ],
            "weights": [
              40,
              30,
              20,
              10
            ],
            "description": "Method used for payment when the coupon was applied."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "monetary",
      "nullable"
    ],
    "analysisQuestions": [
      "What are the most popular routes selected by users?",
      "Which payment methods are preferred by users when booking tickets?",
      "How often are discount coupons applied during the booking process?",
      "What time of day do users typically book their journeys?",
      "Is there a correlation between the use of coupons and the total amount spent?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Users and Payments",
        "sql": "SELECT u.full_name, p.amount FROM users u JOIN payments p ON u.id = p.journey_id;",
        "dialect": "postgres"
      },
      {
        "title": "Aggregate Payments by Method",
        "sql": "SELECT payment_method, SUM(amount) FROM payments GROUP BY payment_method;",
        "dialect": "postgres"
      },
      {
        "title": "Count Coupons Used per Payment",
        "sql": "SELECT p.id, COUNT(ac.coupon_id) FROM payments p LEFT JOIN applied_coupons ac ON p.id = ac.payment_id GROUP BY p.id;",
        "dialect": "postgres"
      },
      {
        "title": "Find Average Spend by Route",
        "sql": "SELECT j.route, AVG(p.amount) FROM journeys j JOIN payments p ON j.id = p.journey_id GROUP BY j.route;",
        "dialect": "postgres"
      },
      {
        "title": "Daily Booking Trends",
        "sql": "SELECT DATE(departure_time) AS booking_date, COUNT(*) FROM journeys GROUP BY booking_date;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Customer Support Analysis",
        "body": "Customer support teams can analyze this dataset to understand common user queries and issues related to booking journeys. This helps in improving support responses and enhancing user satisfaction."
      },
      {
        "title": "Marketing Strategy Development",
        "body": "Marketing teams can use this data to identify popular routes and peak booking times, allowing them to tailor promotions and discounts effectively to maximize user engagement."
      },
      {
        "title": "Business Performance Monitoring",
        "body": "Business analysts can monitor payment trends and coupon usage to assess the effectiveness of promotional campaigns and make data-driven decisions to optimize revenue."
      },
      {
        "title": "User Behavior Research",
        "body": "Researchers can explore user behavior patterns related to booking preferences, payment methods, and coupon usage to provide insights that improve the overall user experience on the platform."
      }
    ]
  },
  "counts": {
    "coupons": 200,
    "users": 500,
    "journeys": 300,
    "payments": 500,
    "applied_coupons": 150
  },
  "stats": {
    "users": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "full_name": {
          "nulls": 54,
          "distinct": 428,
          "min": "Alice Brown",
          "max": "Zoe Tanaka"
        },
        "email": {
          "nulls": 98,
          "distinct": 399
        },
        "registration_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2020-01-03 18:58:55",
          "max": "2023-12-30 23:21:31"
        }
      }
    },
    "journeys": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "user_id": {
          "nulls": 0,
          "distinct": 227,
          "min": 1,
          "max": 498
        },
        "route": {
          "nulls": 30,
          "distinct": 266
        },
        "departure_time": {
          "nulls": 0,
          "distinct": 300,
          "min": "2023-01-04 10:37:26",
          "max": "2023-12-31 08:40:01"
        },
        "seat_count": {
          "nulls": 25,
          "distinct": 59,
          "min": 1,
          "max": 59
        }
      }
    },
    "payments": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "journey_id": {
          "nulls": 0,
          "distinct": 244,
          "min": 1,
          "max": 300
        },
        "payment_method": {
          "nulls": 0,
          "distinct": 4,
          "min": "bank_transfer",
          "max": "paypal"
        },
        "amount": {
          "nulls": 37,
          "distinct": 449,
          "min": 5,
          "max": 149.55
        },
        "payment_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2023-01-01 09:55:05",
          "max": "2023-12-31 16:02:11"
        }
      }
    },
    "coupons": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "code": {
          "nulls": 0,
          "distinct": 153
        },
        "discount_percentage": {
          "nulls": 18,
          "distinct": 31,
          "min": 12,
          "max": 46
        },
        "valid_from": {
          "nulls": 23,
          "distinct": 143,
          "min": "2023-01-03",
          "max": "2023-12-30"
        },
        "valid_until": {
          "nulls": 8,
          "distinct": 143,
          "min": "2023-01-01",
          "max": "2023-12-28"
        }
      }
    },
    "applied_coupons": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "payment_id": {
          "nulls": 0,
          "distinct": 130,
          "min": 4,
          "max": 500
        },
        "coupon_id": {
          "nulls": 0,
          "distinct": 104,
          "min": 1,
          "max": 200
        },
        "applied_date": {
          "nulls": 0,
          "distinct": 150,
          "min": "2023-01-02 14:26:15",
          "max": "2023-12-26 08:40:39"
        },
        "discount_amount": {
          "nulls": 0,
          "distinct": 146,
          "min": 0.5,
          "max": 73.7
        },
        "payment_method": {
          "nulls": 0,
          "distinct": 4,
          "min": "bank_transfer",
          "max": "paypal"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/coupons.csv",
      "format": "csv",
      "table": "coupons",
      "key": "datasets/intercity-bus-ticket-app/v3/csv/coupons.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/csv/coupons.csv",
      "bytes": 8348,
      "sha256": "93fab37b5db9dd14d71975f000328459d0a4a0afa2bc104455356fe3e7386d1f",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/intercity-bus-ticket-app/v3/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/csv/users.csv",
      "bytes": 27687,
      "sha256": "f516f0d5d8e103f17ca8b5c60c0cd27123428863c9996ad8b4cff5f2f960fe2c",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/journeys.csv",
      "format": "csv",
      "table": "journeys",
      "key": "datasets/intercity-bus-ticket-app/v3/csv/journeys.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/csv/journeys.csv",
      "bytes": 15966,
      "sha256": "25156da1807bda8ee06ac29e10d8f636dd3927a166473ce44d36e0836233fb7b",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payments.csv",
      "format": "csv",
      "table": "payments",
      "key": "datasets/intercity-bus-ticket-app/v3/csv/payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/csv/payments.csv",
      "bytes": 22655,
      "sha256": "54f0c6975d05117ecfb852f3f8d72390576b1d06c4ce283dc0178305dc0d3629",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/applied_coupons.csv",
      "format": "csv",
      "table": "applied_coupons",
      "key": "datasets/intercity-bus-ticket-app/v3/csv/applied_coupons.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/csv/applied_coupons.csv",
      "bytes": 7295,
      "sha256": "c57d7af95188441bfe3630cd56658f657e85138c4641e91566da8c05af8c25c0",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "intercity-bus-ticket-app.json",
      "format": "json",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/intercity-bus-ticket-app.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/intercity-bus-ticket-app.json",
      "bytes": 263920,
      "sha256": "c480e6a0892f6d74e8c6f2fd12df691e8256c5d46126744c78ecb13dc1ac1ff7",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/sql/postgres.sql",
      "bytes": 109931,
      "sha256": "8cf07d6db3a08a7f13feace230574b82f3f5d7f4c41bca1d68ef947cc2fc164e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/sql/mysql.sql",
      "bytes": 109366,
      "sha256": "1610af865a8aaa7f09d1228b9cd2a114548137de343cd8635273526ed39b2650",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/sql/mssql.sql",
      "bytes": 113474,
      "sha256": "0e2e8c14ff40d2b5593c064910f8bf1e3b7fe00d737f961e8fb1689ad7960143",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/sql/sqlite.sql",
      "bytes": 109148,
      "sha256": "f3feb84af539b4b4492e149ce029f710f020cf703346381dc50829dcff4f3769",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/prisma/seed.ts",
      "bytes": 225509,
      "sha256": "2fbd9a9e5914efd784bd7fda98dcd7b9363e8cd418885ba0439dbf5469118731",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/intercity-bus-ticket-app/v3/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/intercity-bus-ticket-app/v3/django/fixtures.json",
      "bytes": 335073,
      "sha256": "65651c7533e9a72c6a86800da99e248043cd8ddddf8ff9d7a24490c1d5c03d0c",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767654064,
  "updatedAt": 1789095899635
}
