{
  "format": "dataset-manifest/1",
  "slug": "online-retail-insights",
  "version": 1,
  "seed": "online-retail-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "online-retail-insights",
    "name": "Online Retail Insights",
    "tagline": "Transactions from an e-commerce platform, including purchases, returns, and customer interactions.",
    "description": "E-commerce businesses engage customers through a wide variety of products and services available online, with transactions occurring as users browse, purchase, and occasionally return items. This dataset captures the essence of these interactions, detailing every transaction made, the methods of payment used, discounts applied, and customer support interactions. It models the relationship between transactions, payment methods, discount offers, and support tickets, allowing analysts to explore patterns in purchasing behavior and customer satisfaction. Analyzing this data can reveal trends such as which products are most often returned and the impact of discounts on sales volume. It can be especially useful for businesses aiming to enhance customer loyalty and improve product quality. This synthetic dataset is designed for those looking to practice SQL queries, build BI dashboards, or demo analytics capabilities.",
    "domain": "ecommerce",
    "shape": "star-schema",
    "useCases": [
      "bi-dashboards",
      "analytics-demo"
    ],
    "keywords": [
      "e-commerce",
      "transactions",
      "customer support",
      "discounts",
      "payment methods",
      "returns"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "transactions": {
        "description": "Each row in this table represents a transaction made by a customer, detailing the product purchased, payment method, discounts applied, and any support interactions related to the transaction.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "customer_id": {
            "kind": "int",
            "min": 1,
            "max": 1000,
            "unique": true,
            "description": "Identifier for the customer making the purchase."
          },
          "product_id": {
            "kind": "int",
            "min": 1,
            "max": 2000,
            "unique": true,
            "description": "Identifier for the product purchased."
          },
          "payment_method": {
            "kind": "enum",
            "values": [
              "credit_card",
              "paypal",
              "bank_transfer",
              "gift_card"
            ],
            "description": "Method used for payment in the transaction."
          },
          "discount_applied": {
            "kind": "decimal",
            "min": 0,
            "max": 100,
            "scale": 2,
            "description": "Discount applied to the transaction, expressed as a percentage.",
            "nullable": true,
            "when": {
              "column": "payment_method",
              "in": [
                "credit_card",
                "paypal",
                "bank_transfer",
                "gift_card"
              ]
            }
          },
          "return_status": {
            "kind": "enum",
            "values": [
              "none",
              "initiated",
              "completed"
            ],
            "description": "Status indicating if a return was initiated or completed."
          },
          "support_ticket_created": {
            "kind": "bool",
            "trueRate": 0.2,
            "description": "Indicates if a support ticket was created for the transaction.",
            "nullable": true,
            "when": {
              "column": "return_status",
              "in": [
                "initiated",
                "completed"
              ]
            }
          },
          "transaction_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date and time when the transaction occurred.",
            "dayProfile": "waking"
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "monetary",
      "timestamped",
      "categorical"
    ],
    "analysisQuestions": [
      "What payment methods are most commonly used for transactions?",
      "How do discounts influence the likelihood of returns?",
      "Which products generate the most support tickets?",
      "What are the peak transaction times during the week?",
      "How does customer return behavior vary by product category?"
    ],
    "suggestedQueries": [
      {
        "title": "Get total sales by payment method",
        "sql": "SELECT payment_method, SUM(discount_applied) AS total_sales FROM transactions GROUP BY payment_method;",
        "dialect": "postgres"
      },
      {
        "title": "Count transactions by return status",
        "sql": "SELECT return_status, COUNT(*) AS transaction_count FROM transactions GROUP BY return_status;",
        "dialect": "postgres"
      },
      {
        "title": "Average discount applied for returned items",
        "sql": "SELECT AVG(discount_applied) AS avg_discount FROM transactions WHERE return_status = 'completed';",
        "dialect": "postgres"
      },
      {
        "title": "Identify peak transaction days",
        "sql": "SELECT DATE(transaction_date) AS transaction_day, COUNT(*) AS transaction_count FROM transactions GROUP BY transaction_day ORDER BY transaction_count DESC LIMIT 10;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "E-commerce analyst exploring sales performance",
        "body": "An e-commerce analyst can use this dataset to evaluate sales performance across different payment methods. By querying the data, they can identify trends in consumer behavior, such as which payment methods yield the highest sales, and tailor marketing strategies accordingly."
      },
      {
        "title": "Product manager assessing product performance",
        "body": "A product manager can analyze the transaction data to assess product performance. By examining the return status alongside transaction details, they can identify underperforming products and initiate improvements in product quality or marketing approaches."
      },
      {
        "title": "Customer support lead reviewing support interactions",
        "body": "A customer support lead can utilize the dataset to review the correlation between transaction issues and support ticket creation. This insight helps in proactively addressing customer concerns and enhancing overall customer satisfaction."
      }
    ]
  },
  "counts": {
    "transactions": 500
  },
  "stats": {
    "transactions": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 2,
          "max": 998
        },
        "product_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 1992
        },
        "payment_method": {
          "nulls": 0,
          "distinct": 4,
          "min": "bank_transfer",
          "max": "paypal"
        },
        "discount_applied": {
          "nulls": 0,
          "distinct": 483,
          "min": 0.22,
          "max": 99.97
        },
        "return_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "completed",
          "max": "none"
        },
        "support_ticket_created": {
          "nulls": 161,
          "distinct": 2,
          "min": "false",
          "max": "true"
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2022-01-01 12:14:33",
          "max": "2023-12-28 21:48:01"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/online-retail-insights/v1/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/csv/transactions.csv",
      "bytes": 31417,
      "sha256": "3af8dc0b74426c959c9352d84eb81d7ee0e3985ae2ae8c6121d8f0f95866c046",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "online-retail-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/online-retail-insights/v1/online-retail-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/online-retail-insights.json",
      "bytes": 136406,
      "sha256": "20d579f50cc9c91ef3a6ac7a6ca64d3bcdf55d3649a74b80d45979cae0090e7a",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/online-retail-insights/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/sql/postgres.sql",
      "bytes": 42738,
      "sha256": "954560c8f63d17bc51a0755a5169a1ba8d6850642b772833f5cc5f33a050e392",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/online-retail-insights/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/sql/mysql.sql",
      "bytes": 41336,
      "sha256": "c7f519a5f5c8884f6f5ff0cc09596acd584bcd8cb647cbad0fdb19c4e5786938",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/online-retail-insights/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/sql/mssql.sql",
      "bytes": 42901,
      "sha256": "39cbcd44671d50d0b48aa07eaf7fc76a28d7d110b3f6b47977e781e9577f484c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/online-retail-insights/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/sql/sqlite.sql",
      "bytes": 41307,
      "sha256": "71bbdac75c065fb4fd27c93720e3d67b088a356878c741ddb1f444bda883f8b3",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/online-retail-insights/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/prisma/seed.ts",
      "bytes": 113692,
      "sha256": "30cfcfa6f863d89fd2b9ce7dc55da2379637aaeaf1e32beb151c268405554643",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/online-retail-insights/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/online-retail-insights/v1/django/fixtures.json",
      "bytes": 161951,
      "sha256": "a2f1aaed709d36e276f411a21e7cdf969864381edbd1dd4ed7c018f3023ae0c9",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788733957331,
  "updatedAt": 1788733957331
}
