{
  "format": "dataset-manifest/1",
  "slug": "ecommerce-inventory-dynamics",
  "version": 1,
  "seed": "ecommerce-inventory-dynamics:1",
  "spec": {
    "format": "dataset/1",
    "slug": "ecommerce-inventory-dynamics",
    "name": "Ecommerce Inventory Dynamics",
    "tagline": "Inventory management, orders, customer interactions, and supplier data from an online retail platform.",
    "description": "An online retail platform connects suppliers with consumers, facilitating a seamless shopping experience that thrives on efficient inventory management and order processing. Customers browse through a diverse catalog of products, each with varying stock levels; some items are consistently popular and re-ordered frequently, while others linger in the inventory, rarely making a sale. This dynamic creates an intricate landscape of products, where understanding trends and customer behavior is critical for optimizing both sales and stock levels.\n\nIn this dataset, the 'customers' table holds information about consumer profiles, including demographics and purchase history. Each customer interacts with products through the 'orders' table, which details when purchases are made and what items are included in each transaction. The 'order_items' table breaks down each order into specific products purchased, linking back to the 'products' table that contains vital details such as product descriptions, prices, and current stock quantities. Furthermore, the 'suppliers' table identifies the businesses providing these products, while the 'product_supplier' table connects individual products with their respective suppliers, showcasing the supply chain dynamics.\n\nBy exploring this data, developers can answer pertinent questions about sales trends, inventory turnover, customer preferences, and supplier performance. Analyzing order patterns can reveal which products are best-sellers and which suppliers contribute most to overall sales, helping to refine inventory strategies and improve supplier relationships. This synthetic dataset is particularly useful for practicing data manipulation, querying relationships between tables, and generating insights that can drive decision-making in real ecommerce scenarios.",
    "domain": "ecommerce",
    "shape": "slowly-changing",
    "useCases": [
      "etl-pipelines",
      "teaching"
    ],
    "keywords": [
      "ecommerce",
      "inventory",
      "orders",
      "customers",
      "suppliers",
      "transactions",
      "stock levels",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "This table stores customer information, including their names and preferences. Each customer can have multiple orders linked to them.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "first_name": {
            "kind": "firstName",
            "description": "The customer's first name.",
            "nullable": true
          },
          "last_name": {
            "kind": "lastName",
            "description": "The customer's last name.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "Email address of the customer.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date when the customer registered.",
            "dayProfile": "business"
          }
        }
      },
      "products": {
        "description": "This table contains product details, including variants and stock levels. Each product can have multiple variants linked to it.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each product."
          },
          "name": {
            "kind": "productName",
            "description": "Name of the product."
          },
          "category": {
            "kind": "words",
            "description": "Category to which the product belongs.",
            "nullable": true
          },
          "stock_level": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "Current stock level for the product.",
            "nullable": true
          },
          "price": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "description": "Price of the product.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date when the product was added.",
            "dayProfile": "business"
          }
        }
      },
      "orders": {
        "description": "This table tracks orders placed by customers. Each order is linked to a customer and may contain multiple products.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "References the customer who placed the order."
          },
          "order_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the order was placed.",
            "trend": "growing"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 1,
            "max": 5000,
            "scale": 2,
            "description": "Total amount for the order.",
            "nullable": true
          }
        }
      },
      "order_items": {
        "description": "This table captures the individual items within each order. Each item is linked to an order and a product.",
        "rows": {
          "per": "orders",
          "via": "order_id",
          "min": 1,
          "max": 5,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order item."
          },
          "order_id": {
            "kind": "fk",
            "ref": "orders.id",
            "description": "References the order to which this item belongs."
          },
          "product_id": {
            "kind": "fk",
            "ref": "products.id",
            "description": "References the product that was ordered."
          },
          "quantity": {
            "kind": "int",
            "min": 1,
            "max": 10,
            "description": "Quantity of the product ordered.",
            "nullable": true
          }
        }
      },
      "suppliers": {
        "description": "This table maintains supplier information, including their contact details and the products they supply.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each supplier."
          },
          "name": {
            "kind": "company",
            "description": "Name of the supplier company."
          },
          "contact_email": {
            "kind": "email",
            "description": "Contact email of the supplier.",
            "nullable": true
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number of the supplier.",
            "nullable": true
          }
        }
      },
      "product_supplier": {
        "description": "This table links products to their respective suppliers, enabling tracking of supplier relationships.",
        "rows": {
          "per": "products",
          "via": "product_id",
          "min": 1,
          "max": 3,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each product-supplier link."
          },
          "product_id": {
            "kind": "fk",
            "ref": "products.id",
            "description": "References the product supplied."
          },
          "supplier_id": {
            "kind": "fk",
            "ref": "suppliers.id",
            "description": "References the supplier of the product."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "high-cardinality",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What are the most popular products based on order frequency?",
      "How do stock levels change over time for different products?",
      "What customer demographics are associated with higher order values?",
      "Which suppliers provide the most products, and how does that affect inventory levels?",
      "What trends can be identified in customer reviews and ratings?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Orders",
        "sql": "SELECT customers.first_name, customers.last_name, orders.order_date FROM customers JOIN orders ON customers.id = orders.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Total Sales per Product",
        "sql": "SELECT products.name, SUM(order_items.quantity) AS total_sold FROM order_items JOIN products ON order_items.product_id = products.id GROUP BY products.name;",
        "dialect": "postgres"
      },
      {
        "title": "Average Order Value by Customer",
        "sql": "SELECT customers.first_name, customers.last_name, AVG(orders.total_amount) AS avg_order_value FROM customers JOIN orders ON customers.id = orders.customer_id GROUP BY customers.id;",
        "dialect": "postgres"
      },
      {
        "title": "Stock Level Trends",
        "sql": "SELECT products.name, products.stock_level, products.created_at FROM products ORDER BY products.created_at DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Inventory Management Training",
        "body": "Students learning about inventory management can use this dataset to analyze how stock levels vary over time and understand how to optimize inventory for different products. They can also practice creating reports and dashboards that demonstrate inventory trends."
      },
      {
        "title": "E-commerce Analytics Practice",
        "body": "Data analysts can utilize this dataset to practice their SQL skills by querying customer orders, product sales, and supplier relations. They can explore the relationships between customer behavior and product availability, gaining insights for real-world applications."
      },
      {
        "title": "ETL Pipeline Development",
        "body": "Developers working on ETL processes can use this dataset to design and implement data pipelines that extract, transform, and load customer and order data into analytics platforms. This scenario provides a practical environment to hone skills in data integration."
      }
    ]
  },
  "counts": {
    "customers": 300,
    "orders": 500,
    "products": 200,
    "order_items": 1121,
    "suppliers": 50,
    "product_supplier": 313
  },
  "stats": {
    "customers": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "first_name": {
          "nulls": 22,
          "distinct": 76,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 28,
          "distinct": 78,
          "min": "Adams",
          "max": "Zhang"
        },
        "email": {
          "nulls": 38,
          "distinct": 260
        },
        "created_at": {
          "nulls": 0,
          "distinct": 300,
          "min": "2020-01-09 10:50:20",
          "max": "2023-12-06 11:15:09"
        }
      }
    },
    "products": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "name": {
          "nulls": 0,
          "distinct": 167,
          "min": "Classic Backpack",
          "max": "Wireless Toolkit"
        },
        "category": {
          "nulls": 23,
          "distinct": 177
        },
        "stock_level": {
          "nulls": 20,
          "distinct": 170,
          "min": 6,
          "max": 996
        },
        "price": {
          "nulls": 22,
          "distinct": 178,
          "min": 5.26,
          "max": 998.59
        },
        "created_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2020-01-02 16:49:36",
          "max": "2023-12-31 02:12:56"
        }
      }
    },
    "orders": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 241,
          "min": 2,
          "max": 300
        },
        "order_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2020-01-09 03:32:25",
          "max": "2023-12-30 04:37:35"
        },
        "total_amount": {
          "nulls": 49,
          "distinct": 450,
          "min": 35.23,
          "max": 4977.08
        }
      }
    },
    "order_items": {
      "rows": 1121,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 1121,
          "min": 1,
          "max": 1121
        },
        "order_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "product_id": {
          "nulls": 0,
          "distinct": 199,
          "min": 1,
          "max": 200
        },
        "quantity": {
          "nulls": 115,
          "distinct": 10,
          "min": 1,
          "max": 10
        }
      }
    },
    "suppliers": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 47,
          "min": "Acme Partners",
          "max": "Willow Studio"
        },
        "contact_email": {
          "nulls": 4,
          "distinct": 46
        },
        "phone": {
          "nulls": 2,
          "distinct": 48
        }
      }
    },
    "product_supplier": {
      "rows": 313,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 313,
          "min": 1,
          "max": 313
        },
        "product_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "supplier_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/customers.csv",
      "bytes": 17200,
      "sha256": "14878cb09d72dfc30c7bbb83cdbecb1f5daa3c80bea9cd64cf605bcc1a355199",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/orders.csv",
      "format": "csv",
      "table": "orders",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/orders.csv",
      "bytes": 17840,
      "sha256": "ea502cc1d607614690194f829bc7d27763918ab89290e6d80146ca777e16bc34",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/products.csv",
      "bytes": 14615,
      "sha256": "9f70c00f5a81bbc76149ec8a20368768a7329672b33944de1dfa568ba7e1a742",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/order_items.csv",
      "format": "csv",
      "table": "order_items",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/order_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/order_items.csv",
      "bytes": 15970,
      "sha256": "372de512bcb6a0e384e350096e48d14dbb7424e8e00e9a6fdf570d5f0549487f",
      "rows": 1121,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/suppliers.csv",
      "format": "csv",
      "table": "suppliers",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/suppliers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/suppliers.csv",
      "bytes": 2810,
      "sha256": "6e7e1b044676e0cd70dd89adbcd3d2508fc00b981ea340d31f48832e03b64d39",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/product_supplier.csv",
      "format": "csv",
      "table": "product_supplier",
      "key": "datasets/ecommerce-inventory-dynamics/v1/csv/product_supplier.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/csv/product_supplier.csv",
      "bytes": 3455,
      "sha256": "c1a175658de432679004a29cb8c68ab0cd8823a2b96f3ed441b48ed7e2e29be4",
      "rows": 313,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "ecommerce-inventory-dynamics.json",
      "format": "json",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/ecommerce-inventory-dynamics.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/ecommerce-inventory-dynamics.json",
      "bytes": 294667,
      "sha256": "c8afcb70d01b408bf4478bbbf96f7e133c793c9208319e1044646b3e8ea7b0b7",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/sql/postgres.sql",
      "bytes": 104317,
      "sha256": "6c5424f0dc90daa780709905a999bc448f0c1513b524e72e92e9fe5229e1f01c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/sql/mysql.sql",
      "bytes": 103625,
      "sha256": "11e78af3d5bcb818dde0dc7a797e2b1b7ffb7b7f8a90e49e7b6312ef0b891727",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/sql/mssql.sql",
      "bytes": 106357,
      "sha256": "183859e3bd186ff20760b9f7c4013df1fe1c72f26179d3b2b6028e00389b7677",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/sql/sqlite.sql",
      "bytes": 103350,
      "sha256": "a2d97294197238680f8d84eb96d0549f16545040c18d0a61790c088096376b65",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/prisma/seed.ts",
      "bytes": 235488,
      "sha256": "41063dee20f07e8cc4109421b886a2dee3c7b51b3a78fee46a3c4ba836375127",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/ecommerce-inventory-dynamics/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ecommerce-inventory-dynamics/v1/django/fixtures.json",
      "bytes": 400143,
      "sha256": "457933293473e0883632906cb53c73f55e6869bb90125dd38e4a0fb63aeaba33",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768297828,
  "updatedAt": 1788768297828
}
