{
  "format": "dataset-manifest/1",
  "slug": "logistics-ledger-data",
  "version": 2,
  "seed": "logistics-ledger-data:1",
  "spec": {
    "format": "dataset/1",
    "slug": "logistics-ledger-data",
    "name": "Logistics Ledger Data",
    "tagline": "Transaction records of customers, vendors, sales orders, shipments, invoices, and inventory in logistics.",
    "description": "Companies manage the intricate flow of goods from manufacturers to customers, ensuring timely deliveries and efficient inventory management. This logistics operation revolves around handling sales orders, coordinating shipments, processing invoices, and engaging with various entities such as vendors and customers. Within the network of logistics, records typically focus on standard orders and routine shipments, but also include occasional entries that highlight complex routing operations or unique sales opportunities that may arise during peak seasons.\n\nThe data is structured across several interconnected tables. The 'customers' table captures information about the clients placing orders, while the 'vendors' table details the suppliers providing the products. The 'sales_orders' table records the orders placed by customers, each linked to a specific customer and vendor. Following the sales order process, the 'shipments' table tracks the movement of goods, showing how and when products are delivered to customers. Invoices are generated based on these sales orders and are documented in the 'invoices' table, providing details on payment status and amounts owed. Lastly, the 'inventory' table monitors stock levels, ensuring that vendors can fulfill sales orders effectively and that customers receive their orders without delay.\n\nThis dataset answers critical questions such as how efficiently goods move through the supply chain, the performance of vendors in meeting customer demands, and the financial aspects of logistics transactions. It provides valuable insights into sales trends, inventory turnover, and the overall effectiveness of logistics operations. Developers can practice data analysis and querying techniques that apply to real-world logistics scenarios, enhancing their skills in handling complex datasets. Please note that all data in this dataset is synthetic, designed to simulate the operations and relationships found in a typical logistics business.",
    "domain": "logistics",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "logistics",
      "supply chain",
      "inventory",
      "sales orders",
      "shipments",
      "invoices"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "This table holds information about customers, linking to their orders and invoices. Each customer has a unique identifier.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the customer."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the customer."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number for the customer.",
            "nullable": true
          },
          "address": {
            "kind": "words",
            "description": "Physical address of the customer.",
            "nullable": true,
            "pool": [
              "street",
              "avenue",
              "road",
              "boulevard",
              "lane",
              "court",
              "drive",
              "way",
              "place",
              "square",
              "circle",
              "terrace",
              "park",
              "hill",
              "view",
              "ridge",
              "crossing",
              "point",
              "landing",
              "gate",
              "alley",
              "district",
              "zone",
              "block",
              "section",
              "unit",
              "building",
              "floor",
              "suite",
              "number",
              "city",
              "state",
              "country",
              "postal",
              "code",
              "region",
              "area",
              "location",
              "address",
              "route",
              "path",
              "waypoint",
              "intersection",
              "crossroad",
              "neighborhood",
              "subdivision",
              "community",
              "locality",
              "venue",
              "site",
              "facility",
              "establishment",
              "premises",
              "property",
              "residence",
              "office",
              "warehouse",
              "distribution",
              "center"
            ],
            "min": 2,
            "max": 6
          }
        }
      },
      "vendors": {
        "description": "This table contains vendor information, linking to the products they supply and the orders they fulfill.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each vendor."
          },
          "company": {
            "kind": "company",
            "description": "Name of the vendor company."
          },
          "contact_name": {
            "kind": "fullName",
            "description": "Contact person at the vendor company.",
            "nullable": true
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number for the vendor.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": "contact_name",
            "description": "Email address of the vendor contact.",
            "nullable": true
          }
        }
      },
      "sales_orders": {
        "description": "This table records sales orders placed by customers, linking them to the customers and shipments.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each sales order."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "Reference to the customer who placed the order."
          },
          "order_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the order was placed.",
            "trend": "growing"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 100,
            "max": 5000,
            "scale": 2,
            "description": "Total amount of the sales order.",
            "nullable": true,
            "distribution": "long-tail"
          }
        }
      },
      "shipments": {
        "description": "This table tracks shipments of orders, linking to sales orders and vendors for fulfillment.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shipment."
          },
          "sales_order_id": {
            "kind": "fk",
            "ref": "sales_orders.id",
            "description": "Reference to the sales order being shipped."
          },
          "vendor_id": {
            "kind": "fk",
            "ref": "vendors.id",
            "description": "Reference to the vendor fulfilling the shipment.",
            "nullable": true
          },
          "shipment_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the shipment was processed.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "shipped",
                "delivered"
              ]
            },
            "trend": "growing"
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "shipped",
              "delivered",
              "returned"
            ],
            "description": "Current status of the shipment."
          }
        }
      },
      "invoices": {
        "description": "This table records invoices generated for sales orders, linking to sales orders and customers.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each invoice."
          },
          "sales_order_id": {
            "kind": "fk",
            "ref": "sales_orders.id",
            "description": "Reference to the sales order associated with the invoice."
          },
          "invoice_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the invoice was issued.",
            "trend": "growing"
          },
          "amount_due": {
            "kind": "decimal",
            "min": 100,
            "max": 5000,
            "scale": 2,
            "description": "Total amount due on the invoice.",
            "nullable": true,
            "distribution": "long-tail"
          }
        }
      },
      "inventory": {
        "description": "This table manages inventory records, linking products to vendors and tracking available stock.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each inventory record."
          },
          "vendor_id": {
            "kind": "fk",
            "ref": "vendors.id",
            "description": "Reference to the vendor providing the product."
          },
          "product_name": {
            "kind": "productName",
            "description": "Name of the product in inventory."
          },
          "stock_quantity": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "Quantity of the product available in stock.",
            "distribution": "long-tail"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped",
      "monetary"
    ],
    "analysisQuestions": [
      "What is the average order value for different customer segments?",
      "How many shipments are delayed in a given month?",
      "Which vendors have the highest fulfillment rates based on shipment statuses?",
      "What trends can be observed in order volume over the year?",
      "Which products have the lowest stock levels and are frequently ordered?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Sales Orders",
        "sql": "SELECT c.full_name, so.order_date, so.total_amount FROM customers c JOIN sales_orders so ON c.id = so.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Shipments by Status",
        "sql": "SELECT status, COUNT(*) FROM shipments GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Average Invoice Amount by Customer",
        "sql": "SELECT c.full_name, AVG(i.amount_due) FROM customers c JOIN invoices i ON c.id = i.sales_order_id GROUP BY c.full_name;",
        "dialect": "postgres"
      },
      {
        "title": "Total Sales Amount by Vendor",
        "sql": "SELECT v.company, SUM(so.total_amount) FROM vendors v JOIN sales_orders so ON v.id = so.vendor_id GROUP BY v.company;",
        "dialect": "postgres"
      },
      {
        "title": "Monthly Shipment Trends",
        "sql": "SELECT DATE_TRUNC('month', shipment_date) AS month, COUNT(*) FROM shipments GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Logistics Training Program",
        "body": "In a logistics training program, instructors can use this dataset to help students understand the intricacies of supply chain management. By analyzing real-world scenarios through sales orders and shipment tracking, students can gain practical insights into inventory management and customer relations."
      },
      {
        "title": "SQL Skill Development",
        "body": "Developers looking to enhance their SQL skills can practice with this dataset by constructing complex queries that join multiple tables. This will help them learn how to navigate relationships between customers, orders, shipments, and invoices, preparing them for real-world data challenges."
      },
      {
        "title": "Business Intelligence Dashboard Creation",
        "body": "Data analysts can leverage this dataset to create business intelligence dashboards that visualize key logistics metrics. By analyzing shipment statuses, order trends, and vendor performance, they can provide actionable insights to improve operational efficiency and customer satisfaction."
      },
      {
        "title": "Inventory Management Simulation",
        "body": "This dataset can be utilized in simulations for inventory management, allowing users to experiment with stock levels, vendor performance, and order volumes. It enables practitioners to understand the impact of inventory decisions on overall logistics operations."
      }
    ]
  },
  "counts": {
    "customers": 200,
    "sales_orders": 300,
    "invoices": 250,
    "vendors": 150,
    "inventory": 100,
    "shipments": 250
  },
  "stats": {
    "customers": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 200,
          "min": "Alice Clark",
          "max": "Zoe Wright"
        },
        "email": {
          "nulls": 0,
          "distinct": 200
        },
        "phone": {
          "nulls": 20,
          "distinct": 175
        },
        "address": {
          "nulls": 19,
          "distinct": 181
        }
      }
    },
    "vendors": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "company": {
          "nulls": 0,
          "distinct": 129,
          "min": "Apex Media",
          "max": "Willow Works"
        },
        "contact_name": {
          "nulls": 12,
          "distinct": 136,
          "min": "Alice Ahmed",
          "max": "Zoe Meyer"
        },
        "phone": {
          "nulls": 21,
          "distinct": 126
        },
        "email": {
          "nulls": 24,
          "distinct": 125
        }
      }
    },
    "sales_orders": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 163,
          "min": 1,
          "max": 199
        },
        "order_date": {
          "nulls": 0,
          "distinct": 213,
          "min": "2023-01-03",
          "max": "2023-12-30"
        },
        "total_amount": {
          "nulls": 29,
          "distinct": 268,
          "min": 100,
          "max": 4856.84
        }
      }
    },
    "shipments": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "sales_order_id": {
          "nulls": 0,
          "distinct": 164,
          "min": 1,
          "max": 298
        },
        "vendor_id": {
          "nulls": 20,
          "distinct": 122,
          "min": 1,
          "max": 150
        },
        "shipment_date": {
          "nulls": 122,
          "distinct": 111,
          "min": "2023-01-02",
          "max": "2023-12-31"
        },
        "status": {
          "nulls": 0,
          "distinct": 4,
          "min": "delivered",
          "max": "shipped"
        }
      }
    },
    "invoices": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "sales_order_id": {
          "nulls": 0,
          "distinct": 167,
          "min": 2,
          "max": 300
        },
        "invoice_date": {
          "nulls": 0,
          "distinct": 170,
          "min": "2023-01-03",
          "max": "2023-12-31"
        },
        "amount_due": {
          "nulls": 23,
          "distinct": 227,
          "min": 100.06,
          "max": 4982.97
        }
      }
    },
    "inventory": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "vendor_id": {
          "nulls": 0,
          "distinct": 77,
          "min": 1,
          "max": 149
        },
        "product_name": {
          "nulls": 0,
          "distinct": 93,
          "min": "Classic Backpack",
          "max": "Wireless Umbrella"
        },
        "stock_quantity": {
          "nulls": 0,
          "distinct": 90,
          "min": 0,
          "max": 984
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/logistics-ledger-data/v2/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/customers.csv",
      "bytes": 16533,
      "sha256": "279dc227778a13570bb1b18b1bdd4f8c7266c04c5fd6999783a53d8af9d3568a",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sales_orders.csv",
      "format": "csv",
      "table": "sales_orders",
      "key": "datasets/logistics-ledger-data/v2/csv/sales_orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/sales_orders.csv",
      "bytes": 7852,
      "sha256": "dbbfb74512525810ab4f5a5259c9cf0904737795ee8dbe2fe7c45c888c4988cb",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/invoices.csv",
      "format": "csv",
      "table": "invoices",
      "key": "datasets/logistics-ledger-data/v2/csv/invoices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/invoices.csv",
      "bytes": 6593,
      "sha256": "50ec5838f491f6c1b0b72b6d7c62ee8e27c762f8134dfef3f97b2191e47d5f98",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/vendors.csv",
      "format": "csv",
      "table": "vendors",
      "key": "datasets/logistics-ledger-data/v2/csv/vendors.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/vendors.csv",
      "bytes": 9605,
      "sha256": "2181fc5a161bbdd67f27d0e79ab39f8cc7aa32b35668876c9270a871a9c6a0d1",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/inventory.csv",
      "format": "csv",
      "table": "inventory",
      "key": "datasets/logistics-ledger-data/v2/csv/inventory.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/inventory.csv",
      "bytes": 2652,
      "sha256": "b29ec7d30d901de62866967beadaa7a9b558a55c2d5797d520f373ce53ba14ac",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shipments.csv",
      "format": "csv",
      "table": "shipments",
      "key": "datasets/logistics-ledger-data/v2/csv/shipments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/csv/shipments.csv",
      "bytes": 6599,
      "sha256": "258032172e6b516dec6755088fc262cb6738a7d253422bf4f9f78c5093649e02",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "logistics-ledger-data.json",
      "format": "json",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/logistics-ledger-data.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/logistics-ledger-data.json",
      "bytes": 175793,
      "sha256": "12a1be92b679cadaf749200d932caeb158a0c572916c2d691897594f8f440449",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/sql/postgres.sql",
      "bytes": 70801,
      "sha256": "11620c74e5aa0586f7e5412155fd0478cfb440e867a32ebb205f245369fcbe9b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/sql/mysql.sql",
      "bytes": 70126,
      "sha256": "c0bb62b5b9154aa733cc2af81f5c07919436d9fabea9e9d4b35a4c08f8889aa2",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/sql/mssql.sql",
      "bytes": 72846,
      "sha256": "ece698b73ca747f3aa5638e8879480aaaf11be8a75c688d311d627098f6c5352",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/sql/sqlite.sql",
      "bytes": 69863,
      "sha256": "6787c64b28298e5df7bd7fe8ab5e651ed67b4967d1ccf2f6d62049b8d46e066c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/prisma/seed.ts",
      "bytes": 138019,
      "sha256": "0e12642cbcc22ce9ef04d58147bf7b63cd257000e34f24a363be6c05b9fa4dea",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/logistics-ledger-data/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-ledger-data/v2/django/fixtures.json",
      "bytes": 229661,
      "sha256": "e925c674da193bee96a155818b597ebfacee5b73dc05e087bfd9df1f99fb0b0c",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767615869,
  "updatedAt": 1788784743792
}
