{
  "format": "dataset-manifest/1",
  "slug": "logistics-optimization-dataset",
  "version": 1,
  "seed": "logistics-optimization-dataset:1",
  "spec": {
    "format": "dataset/1",
    "slug": "logistics-optimization-dataset",
    "name": "Logistics Optimization Dataset",
    "tagline": "Streamline your logistics operations with synthetic data.",
    "description": "Logistics operations depend on the seamless flow of products from suppliers to customers. This dataset models the intricate relationships between various aspects of logistics, including inventory management, shipping methods, and customer interactions. The tables within this dataset capture details about customers, products, orders, shipping methods, and product categories. By analyzing these interconnected tables, users can uncover insights into customer behavior, optimize shipping routes, and improve inventory management. The data is synthetic, ensuring it remains relevant for practice and educational purposes while maintaining a realistic structure for analysis. Each table is designed to capture specific aspects of logistics, making it ideal for SQL practice and teaching, allowing users to formulate queries that can answer critical business questions.",
    "domain": "logistics",
    "shape": "hierarchical",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "logistics",
      "inventory",
      "shipping",
      "sales",
      "customers",
      "products",
      "orders",
      "categories"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "Each row represents a customer with unique details. It links to orders placed by the customer.",
        "rows": 300,
        "columns": {
          "customer_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.",
            "nullable": true
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number of the customer.",
            "nullable": true
          },
          "join_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date the customer joined.",
            "trend": "growing"
          }
        }
      },
      "products": {
        "description": "Each row describes a product available for sale, linked to its category and the orders that include it.",
        "rows": 200,
        "columns": {
          "product_id": {
            "kind": "pk",
            "description": "Unique identifier for each product."
          },
          "product_name": {
            "kind": "productName",
            "description": "Name of the product."
          },
          "category_id": {
            "kind": "fk",
            "ref": "product_categories.category_id",
            "description": "References the category of the product."
          },
          "price": {
            "kind": "decimal",
            "min": 1,
            "max": 500,
            "scale": 2,
            "description": "Price of the product.",
            "nullable": true
          },
          "stock_quantity": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "Available stock quantity of the product.",
            "nullable": true
          }
        }
      },
      "product_categories": {
        "description": "This table holds product categories, each linked to multiple products.",
        "rows": 10,
        "columns": {
          "category_id": {
            "kind": "pk",
            "description": "Unique identifier for each product category."
          },
          "category_name": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "Name of the product category."
          }
        }
      },
      "orders": {
        "description": "Each row represents an order made by a customer, linking to products included in the order.",
        "rows": 500,
        "columns": {
          "order_id": {
            "kind": "pk",
            "description": "Unique identifier for each order."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.customer_id",
            "description": "References the customer who placed the order."
          },
          "order_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date and time the order was placed.",
            "dayProfile": "business"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 1,
            "max": 5000,
            "scale": 2,
            "description": "Total amount of the order.",
            "nullable": true
          }
        }
      },
      "shipping_methods": {
        "description": "This table lists different shipping methods available for orders.",
        "rows": 5,
        "columns": {
          "shipping_method_id": {
            "kind": "pk",
            "description": "Unique identifier for each shipping method."
          },
          "method_name": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "Name of the shipping method."
          },
          "cost": {
            "kind": "decimal",
            "min": 0,
            "max": 100,
            "scale": 2,
            "description": "Cost associated with the shipping method.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "monetary",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What are the most popular product categories among customers?",
      "How do order totals vary by shipping method?",
      "Which customers have the highest order frequency?",
      "What is the average time between order placement and shipping?",
      "How does stock quantity affect the likelihood of an order being placed?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Orders",
        "sql": "SELECT c.full_name, o.order_id FROM customers c JOIN orders o ON c.customer_id = o.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Aggregate Orders by Shipping Method",
        "sql": "SELECT sm.method_name, COUNT(o.order_id) AS order_count FROM orders o JOIN shipping_methods sm ON o.shipping_method_id = sm.shipping_method_id GROUP BY sm.method_name;",
        "dialect": "postgres"
      },
      {
        "title": "Total Sales by Product Category",
        "sql": "SELECT pc.category_name, SUM(o.total_amount) AS total_sales FROM orders o JOIN products p ON o.product_id = p.product_id JOIN product_categories pc ON p.category_id = pc.category_id GROUP BY pc.category_name;",
        "dialect": "postgres"
      },
      {
        "title": "Customer Order Frequency",
        "sql": "SELECT c.full_name, COUNT(o.order_id) AS order_count FROM customers c LEFT JOIN orders o ON c.customer_id = o.customer_id GROUP BY c.full_name ORDER BY order_count DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Inventory Management Training",
        "body": "Educators can utilize this dataset to train students on inventory management principles, helping them understand how product categories and stock levels impact sales decisions."
      },
      {
        "title": "Customer Analytics Projects",
        "body": "Data analysts can explore customer behavior patterns, leveraging the customer and order tables to analyze purchasing trends and identify key customer segments."
      },
      {
        "title": "Shipping Cost Analysis",
        "body": "Logistics managers can analyze the effectiveness of different shipping methods, using the shipping methods table to evaluate costs and delivery times against customer satisfaction."
      }
    ]
  },
  "counts": {
    "customers": 300,
    "orders": 500,
    "product_categories": 10,
    "products": 200,
    "shipping_methods": 5
  },
  "stats": {
    "customers": {
      "rows": 300,
      "columns": {
        "customer_id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "full_name": {
          "nulls": 0,
          "distinct": 293,
          "min": "Alice Costa",
          "max": "Zoe Garcia"
        },
        "email": {
          "nulls": 40,
          "distinct": 258
        },
        "phone": {
          "nulls": 36,
          "distinct": 253
        },
        "join_date": {
          "nulls": 0,
          "distinct": 264,
          "min": "2020-01-03",
          "max": "2023-12-30"
        }
      }
    },
    "products": {
      "rows": 200,
      "columns": {
        "product_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "product_name": {
          "nulls": 0,
          "distinct": 161,
          "min": "Classic Bottle",
          "max": "Wireless Toolkit"
        },
        "category_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "price": {
          "nulls": 18,
          "distinct": 181,
          "min": 4.55,
          "max": 496.13
        },
        "stock_quantity": {
          "nulls": 17,
          "distinct": 169,
          "min": 4,
          "max": 985
        }
      }
    },
    "product_categories": {
      "rows": 10,
      "columns": {
        "category_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "category_name": {
          "nulls": 0,
          "distinct": 10
        }
      }
    },
    "orders": {
      "rows": 500,
      "columns": {
        "order_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 252,
          "min": 1,
          "max": 300
        },
        "order_date": {
          "nulls": 0,
          "distinct": 500,
          "min": "2020-01-06 17:27:13",
          "max": "2023-12-30 12:59:54"
        },
        "total_amount": {
          "nulls": 47,
          "distinct": 453,
          "min": 8.49,
          "max": 4993.64
        }
      }
    },
    "shipping_methods": {
      "rows": 5,
      "columns": {
        "shipping_method_id": {
          "nulls": 0,
          "distinct": 5,
          "min": 1,
          "max": 5
        },
        "method_name": {
          "nulls": 0,
          "distinct": 5
        },
        "cost": {
          "nulls": 0,
          "distinct": 5,
          "min": 24.94,
          "max": 89.66
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/logistics-optimization-dataset/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/csv/customers.csv",
      "bytes": 18959,
      "sha256": "fd2274f2d582c65f8fc2737f00583e5d6646d3c62854cd886dd82d0fe894b922",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/orders.csv",
      "format": "csv",
      "table": "orders",
      "key": "datasets/logistics-optimization-dataset/v1/csv/orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/csv/orders.csv",
      "bytes": 17821,
      "sha256": "d7da642f5cf3eb1e3c956861007f1485ad1fa500c0549e4a27ba4c3ff9fc6843",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/product_categories.csv",
      "format": "csv",
      "table": "product_categories",
      "key": "datasets/logistics-optimization-dataset/v1/csv/product_categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/csv/product_categories.csv",
      "bytes": 176,
      "sha256": "1806084c4e648a5395f4a0c3763268e1cb2fb077e77189afc8b294cb15c5e932",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/logistics-optimization-dataset/v1/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/csv/products.csv",
      "bytes": 6313,
      "sha256": "89388380f0b067076a4f52d4ade49618e94f63ad2a0f3874c8325d46580902b7",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shipping_methods.csv",
      "format": "csv",
      "table": "shipping_methods",
      "key": "datasets/logistics-optimization-dataset/v1/csv/shipping_methods.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/csv/shipping_methods.csv",
      "bytes": 159,
      "sha256": "d6486668b2228e571cd9870bfa78582923ed3ae7e6c3f330057475749aabc5e5",
      "rows": 5,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "logistics-optimization-dataset.json",
      "format": "json",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/logistics-optimization-dataset.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/logistics-optimization-dataset.json",
      "bytes": 151632,
      "sha256": "e4c643c82785bbc0ad50082a20f096f89d1347fc34a571a7179688d5b7ce55ac",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/sql/postgres.sql",
      "bytes": 60023,
      "sha256": "676e455a8a3bc4b5058fc4f8b711d174403329b06d5ec53c72a35161852200f7",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/sql/mysql.sql",
      "bytes": 59349,
      "sha256": "8180fc206f1732b4e1fa020bfc9807f33662064356dfdcd343ca3004aa09d98c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/sql/mssql.sql",
      "bytes": 61534,
      "sha256": "8aa9ddd4c95481413290eb8297b343eb6e96545f0408b05ddf763871dc3faf18",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/sql/sqlite.sql",
      "bytes": 59215,
      "sha256": "f778388a60c7a67d1443483ccf681706309ac10824ba10062d3ae42610400de4",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/prisma/seed.ts",
      "bytes": 127206,
      "sha256": "f282351864655e57681e62a7da456a5f6ae889fbcda5d968bc7d9ba9944dc57a",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/logistics-optimization-dataset/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-optimization-dataset/v1/django/fixtures.json",
      "bytes": 187868,
      "sha256": "d605aa6debf9748c1eeb9ff9b92a626d41f04d2ba1e8d802d3159aef326ad1ce",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766736450,
  "updatedAt": 1788766736450
}
