{
  "format": "dataset-manifest/1",
  "slug": "ecommerce-sales-insights",
  "version": 1,
  "seed": "ecommerce-sales-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "ecommerce-sales-insights",
    "name": "Ecommerce Sales Insights",
    "tagline": "Transactions data from an online retail platform, including customers, orders, products, and payment methods.",
    "description": "An online retail platform connects customers with a wide variety of products, facilitating frequent transactions that capture valuable insights into consumer behavior. Customers browse through an extensive catalog of items ranging from electronics to clothing, making selections based on preferences, trends, and seasonal demands. Each purchase contributes to a richer tapestry of data, including details about order amounts, product categories, and the various payment methods utilized in the transaction process.\n\nThe tables in this dataset interact closely, allowing for a comprehensive understanding of the business dynamics. Each row in the customers table represents a unique shopper, complete with demographic information that can be analyzed for targeted marketing strategies. The orders table details each transaction, linking directly to customers through a customer ID. Products in the products table are categorized based on type and style, which can be cross-referenced with the categories table to analyze the performance of different segments. Payments data captures the various methods consumers use to finalize their purchases, which can be tied back to specific orders and customers.\n\nWith this rich dataset, developers can explore various analytical questions, such as identifying trends in purchasing behavior, understanding the relationship between product categories and customer demographics, or evaluating the effectiveness of payment methods across different order types. The insights gleaned from this data are ideal for practicing data manipulation, visualization, and statistical analysis techniques. It's important to note that this data is synthetic, designed to resemble real-world scenarios while maintaining privacy and compliance standards.",
    "domain": "ecommerce",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "ecommerce",
      "sales",
      "customers",
      "products",
      "orders",
      "payments",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "Each row represents a unique customer profile, linking to all their associated orders. It helps in understanding customer demographics and behaviors.",
        "rows": 250,
        "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": "Email address associated with the customer."
          },
          "registration_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "Date when the customer registered."
          },
          "city": {
            "kind": "city",
            "description": "City where the customer resides.",
            "nullable": true
          }
        }
      },
      "orders": {
        "description": "Each row corresponds to a customer order, detailing the total amount and linking back to the customer. It allows tracking of order quantities and values.",
        "rows": 600,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "Reference to the customer who placed the order."
          },
          "order_date": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2023-01-01",
            "dayProfile": "business",
            "description": "Date and time when the order was placed."
          },
          "total_amount": {
            "kind": "decimal",
            "min": 10,
            "max": 5000,
            "scale": 2,
            "distribution": "heavy-tail",
            "description": "Total amount of the order.",
            "nullable": true
          }
        }
      },
      "products": {
        "description": "This table contains details about the products available for purchase, linked to the orders. It represents the inventory available on the platform.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each product."
          },
          "product_name": {
            "kind": "words",
            "min": 2,
            "max": 5,
            "description": "Name of the product."
          },
          "category_id": {
            "kind": "fk",
            "ref": "categories.id",
            "description": "Reference to the product's category."
          },
          "price": {
            "kind": "decimal",
            "min": 5,
            "max": 2000,
            "scale": 2,
            "distribution": "normal",
            "description": "Retail price of the product.",
            "nullable": true
          }
        }
      },
      "categories": {
        "description": "Each row represents a product category. It links products to their respective categories, allowing analysis of product distribution across categories.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each category."
          },
          "category_name": {
            "kind": "words",
            "min": 2,
            "max": 3,
            "description": "Name of the product category.",
            "nullable": true
          }
        }
      },
      "payments": {
        "description": "This table captures the payment methods used for each order. It links back to orders and allows for analysis of payment trends.",
        "rows": 600,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each payment record."
          },
          "order_id": {
            "kind": "fk",
            "ref": "orders.id",
            "description": "Reference to the order associated with the payment."
          },
          "payment_method": {
            "kind": "enum",
            "values": [
              "Credit Card",
              "PayPal",
              "Gift Card",
              "Bank Transfer"
            ],
            "description": "Method used for payment."
          },
          "payment_date": {
            "kind": "datetime",
            "from": "2021-01-01",
            "to": "2023-01-01",
            "dayProfile": "business",
            "description": "Date and time when the payment was made.",
            "nullable": true,
            "when": {
              "column": "payment_method",
              "in": [
                "Credit Card",
                "PayPal",
                "Gift Card",
                "Bank Transfer"
              ]
            }
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "monetary"
    ],
    "analysisQuestions": [
      "What are the most popular product categories among customers?",
      "How do total order amounts vary by payment method?",
      "Which customers have the highest lifetime value based on their orders?",
      "What trends can be observed in order quantities over time?",
      "How do purchase patterns differ between luxury items and common goods?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Orders",
        "sql": "SELECT c.full_name, o.total_amount FROM customers c JOIN orders o ON c.id = o.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Total Sales by Category",
        "sql": "SELECT cat.category_name, SUM(o.total_amount) AS total_sales FROM categories cat JOIN products p ON cat.id = p.category_id JOIN orders o ON p.id = o.id GROUP BY cat.category_name;",
        "dialect": "postgres"
      },
      {
        "title": "Average Order Amount by Payment Method",
        "sql": "SELECT p.payment_method, AVG(o.total_amount) AS avg_order FROM payments p JOIN orders o ON p.order_id = o.id GROUP BY p.payment_method;",
        "dialect": "postgres"
      },
      {
        "title": "Orders Over Time",
        "sql": "SELECT DATE_TRUNC('month', o.order_date) AS month, COUNT(*) AS total_orders FROM orders o GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Ecommerce Analytics Dashboard",
        "body": "Data analysts at an ecommerce company can use this dataset to build a dashboard that visualizes sales trends over time, identifies top-selling products, and analyzes customer spending habits. By querying the data, they can derive insights on customer behaviors and optimize marketing strategies accordingly."
      },
      {
        "title": "ORM Development Practice",
        "body": "Developers building an ecommerce application can use this dataset to seed their database and test their ORM frameworks. By populating their models with realistic data, they can ensure that their application behaves as expected and handles various scenarios, such as customer orders and product categories."
      },
      {
        "title": "Payment Method Analysis",
        "body": "Financial analysts can leverage this dataset to study the effectiveness of different payment methods. By analyzing payment trends and how they correlate with order values, they can provide recommendations to improve the payment process and enhance customer satisfaction."
      },
      {
        "title": "Customer Segmentation",
        "body": "Marketers can utilize this dataset to segment customers based on their purchasing habits. By identifying patterns in customer orders, they can tailor promotions and campaigns to specific customer groups, increasing engagement and conversion rates."
      }
    ]
  },
  "counts": {
    "categories": 10,
    "customers": 250,
    "orders": 600,
    "payments": 600,
    "products": 400
  },
  "stats": {
    "customers": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "full_name": {
          "nulls": 0,
          "distinct": 246,
          "min": "Alice Andersen",
          "max": "Zoe Hassan"
        },
        "email": {
          "nulls": 0,
          "distinct": 248
        },
        "registration_date": {
          "nulls": 0,
          "distinct": 227,
          "min": "2020-01-02",
          "max": "2023-01-01"
        },
        "city": {
          "nulls": 25,
          "distinct": 59,
          "min": "Amsterdam",
          "max": "Zurich"
        }
      }
    },
    "orders": {
      "rows": 600,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 600,
          "min": 1,
          "max": 600
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 221,
          "min": 1,
          "max": 250
        },
        "order_date": {
          "nulls": 0,
          "distinct": 600,
          "min": "2021-01-01 16:43:45",
          "max": "2023-01-01 09:18:13"
        },
        "total_amount": {
          "nulls": 61,
          "distinct": 523,
          "min": 10,
          "max": 4969.37
        }
      }
    },
    "products": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "product_name": {
          "nulls": 0,
          "distinct": 400
        },
        "category_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "price": {
          "nulls": 45,
          "distinct": 355,
          "min": 250.18,
          "max": 1696.45
        }
      }
    },
    "categories": {
      "rows": 10,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "category_name": {
          "nulls": 2,
          "distinct": 8
        }
      }
    },
    "payments": {
      "rows": 600,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 600,
          "min": 1,
          "max": 600
        },
        "order_id": {
          "nulls": 0,
          "distinct": 382,
          "min": 2,
          "max": 599
        },
        "payment_method": {
          "nulls": 0,
          "distinct": 4,
          "min": "Bank Transfer",
          "max": "PayPal"
        },
        "payment_date": {
          "nulls": 0,
          "distinct": 600,
          "min": "2021-01-02 14:21:40",
          "max": "2023-01-01 15:27:39"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/categories.csv",
      "format": "csv",
      "table": "categories",
      "key": "datasets/ecommerce-sales-insights/v1/csv/categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/csv/categories.csv",
      "bytes": 168,
      "sha256": "acee894d8eee71d961f0f08e3b2420a77c735c2398e68e48408e6a1824fbf290",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/ecommerce-sales-insights/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/csv/customers.csv",
      "bytes": 14788,
      "sha256": "7b1955fd6502e37f3dc4aac9cedbea4930a30fb1f0b1e06a2450539845282620",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/orders.csv",
      "format": "csv",
      "table": "orders",
      "key": "datasets/ecommerce-sales-insights/v1/csv/orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/csv/orders.csv",
      "bytes": 20997,
      "sha256": "c80f284cd013a77f37b4a25c08d84d5482b03fa2dfc7dc35806371f1f87dd4bf",
      "rows": 600,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payments.csv",
      "format": "csv",
      "table": "payments",
      "key": "datasets/ecommerce-sales-insights/v1/csv/payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/csv/payments.csv",
      "bytes": 23780,
      "sha256": "0ae33bc11070e720c43e8683d02eaeae31a93339c205ac392d5ba8f2eb2bc09c",
      "rows": 600,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/ecommerce-sales-insights/v1/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/csv/products.csv",
      "bytes": 14693,
      "sha256": "b4ca4539719b92a3d1811cadbb66c0bdac3a9f05959b0cd321d608eff3cd98b2",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "ecommerce-sales-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/ecommerce-sales-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/ecommerce-sales-insights.json",
      "bytes": 249945,
      "sha256": "3e894d794682dbb82d43d2d73d7774c5b27b2be2ef63f8074a82326e15e545c0",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/sql/postgres.sql",
      "bytes": 101077,
      "sha256": "b838b2dfa5af66a264cc8c12221edf376492c30fe07de440fa9ff4de8ff964ec",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/sql/mysql.sql",
      "bytes": 100530,
      "sha256": "8ef0d7f8a505f967c7b00eb962529d4eae81c1cccd7e451945665e75144f0bd5",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/sql/mssql.sql",
      "bytes": 104028,
      "sha256": "e3756799ff16a3d516602da63d3092f34d88798dcd8568df8eb3fe4a14d4337f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/sql/sqlite.sql",
      "bytes": 100365,
      "sha256": "35457eceb8f77173bbd9f3787e84685e698d4e50403df3f587f762d4520bc995",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/prisma/seed.ts",
      "bytes": 212230,
      "sha256": "50450bf6f149cfc2b861b5ecf224c39393b42a0b08b189695352b444efe20c60",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/ecommerce-sales-insights/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-sales-insights/v1/django/fixtures.json",
      "bytes": 329068,
      "sha256": "2eca6773e7398a52d8f5f501765fefffabb81326e1678255e3821d66d144fc27",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768456414,
  "updatedAt": 1788768456414
}
