{
  "format": "dataset-manifest/1",
  "slug": "logistics-return-management",
  "version": 1,
  "seed": "logistics-return-management:1",
  "spec": {
    "format": "dataset/1",
    "slug": "logistics-return-management",
    "name": "Logistics Return Management",
    "tagline": "Returns, customers, products, payment methods, and shipment history for efficient logistics operations.",
    "description": "Logistics operations track customer returns, ensuring that each returned item is processed efficiently and restocked promptly. Employees monitor customers and their return requests alongside shipments to maintain a smooth workflow. This business revolves around understanding customer behavior related to returns, managing various products, and addressing the challenges that arise from different payment methods used in transactions. The operation ensures that returns are processed swiftly, often within a week, but it also identifies products that tend to be returned more frequently, indicating potential issues in quality or customer satisfaction. \n\nThe data structure consists of several interrelated tables. The 'customers' table captures essential details like customer IDs, names, and contact information, which link to the 'returns' table. Each row in the 'returns' table represents a specific product return, connecting customers to the products being returned. The 'products' table holds information about each product's category and details, allowing for analysis of return trends by product type. In addition, the 'payment_methods' table lists the different methods used to process transactions, which can uncover patterns in customer preferences for returns. Finally, the 'shipment_history' table tracks delivery details related to returns, providing insight into the efficiency of logistics operations. \n\nQuestions this data can help answer include: Which products have the highest return rates? What payment methods correlate with successful returns? How does shipment history impact the timeliness of processing returns? By exploring these relationships, developers can practice their skills in data analysis, trends identification, and operational efficiency improvement. Remember, the data is synthetic, designed to simulate real-world scenarios while allowing you to focus on learning and practicing analytics techniques.",
    "domain": "logistics",
    "shape": "star-schema",
    "useCases": [
      "bi-dashboards",
      "analytics-demo"
    ],
    "keywords": [
      "logistics",
      "returns",
      "customers",
      "products",
      "payments",
      "shipment",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "This table contains information about customers, including their demographics and locations, linking to their return activities.",
        "rows": 250,
        "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."
          },
          "city": {
            "kind": "city",
            "description": "City where the customer resides.",
            "nullable": true
          },
          "country": {
            "kind": "country",
            "from": "city",
            "description": "Country of the customer.",
            "nullable": true
          }
        }
      },
      "returns": {
        "description": "This table logs the return transactions, linking each return to a customer and a product, along with the return status.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each return transaction."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "Reference to the customer who initiated the return."
          },
          "product_id": {
            "kind": "fk",
            "ref": "products.id",
            "description": "Reference to the product being returned."
          },
          "return_status": {
            "kind": "enum",
            "values": [
              "pending",
              "completed",
              "rejected"
            ],
            "description": "Current status of the return process."
          },
          "return_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the return was initiated.",
            "nullable": true,
            "when": {
              "column": "return_status",
              "in": [
                "completed",
                "rejected"
              ]
            }
          }
        }
      },
      "products": {
        "description": "This table provides details about products available for return, including categories and prices.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each product."
          },
          "product_name": {
            "kind": "productName",
            "description": "Name of the product."
          },
          "category": {
            "kind": "enum",
            "values": [
              "electronics",
              "clothing",
              "home",
              "toys"
            ],
            "description": "Category to which the product belongs."
          },
          "price": {
            "kind": "decimal",
            "min": 10,
            "max": 500,
            "scale": 2,
            "description": "Price of the product.",
            "nullable": true,
            "when": {
              "column": "category",
              "in": [
                "electronics",
                "clothing"
              ]
            }
          }
        }
      },
      "payment_methods": {
        "description": "This table lists the various payment methods utilized during the initial purchase of products.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each payment method."
          },
          "method_name": {
            "kind": "enum",
            "values": [
              "credit_card",
              "paypal",
              "bank_transfer",
              "cash"
            ],
            "description": "Type of payment method used by the customer."
          }
        }
      },
      "shipment_history": {
        "description": "This table tracks the shipment details related to returns, including tracking numbers and shipment dates.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shipment record."
          },
          "return_id": {
            "kind": "fk",
            "ref": "returns.id",
            "description": "Reference to the return transaction related to this shipment."
          },
          "tracking_number": {
            "kind": "uuid",
            "description": "Unique tracking number for the shipment.",
            "nullable": true
          },
          "shipment_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "dayProfile": "business",
            "description": "Date when the item was shipped back.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What percentage of returns are completed versus pending?",
      "Which product categories have the highest return rates?",
      "How do return rates vary by payment method?",
      "What trends can be observed in return dates over the year?",
      "Which customers have the most frequent returns?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Returns with Customers",
        "sql": "SELECT r.id, c.full_name FROM returns r JOIN customers c ON r.customer_id = c.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Returns by Status",
        "sql": "SELECT return_status, COUNT(*) FROM returns GROUP BY return_status;",
        "dialect": "postgres"
      },
      {
        "title": "Average Price of Returned Products by Category",
        "sql": "SELECT p.category, AVG(p.price) FROM returns r JOIN products p ON r.product_id = p.id GROUP BY p.category;",
        "dialect": "postgres"
      },
      {
        "title": "Returns Over Time",
        "sql": "SELECT DATE(return_date) AS return_day, COUNT(*) FROM returns GROUP BY return_day ORDER BY return_day;",
        "dialect": "postgres"
      },
      {
        "title": "Frequent Return Customers",
        "sql": "SELECT c.full_name, COUNT(r.id) AS return_count FROM customers c JOIN returns r ON c.id = r.customer_id GROUP BY c.full_name ORDER BY return_count DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "BI Dashboard Development",
        "body": "Data analysts can utilize this dataset to build comprehensive dashboards that visualize return rates, customer behavior, and trends over time. This allows businesses to monitor the effectiveness of their return policies and identify areas for improvement."
      },
      {
        "title": "Return Rate Analysis",
        "body": "Logistics managers can analyze return rates by product categories and payment methods to identify problematic areas in their inventory. This insight can help them make informed decisions about product offerings and payment options."
      },
      {
        "title": "Customer Return Patterns",
        "body": "Customer support teams can leverage this dataset to identify customers with high return frequencies. Understanding these patterns can assist in tailoring customer service approaches and potentially preventing future returns."
      },
      {
        "title": "Product Performance Evaluation",
        "body": "Marketing teams can evaluate the performance of different product categories based on return rates. This analysis can inform future marketing strategies and inventory management decisions."
      }
    ]
  },
  "counts": {
    "customers": 250,
    "payment_methods": 100,
    "products": 200,
    "returns": 500,
    "shipment_history": 300
  },
  "stats": {
    "customers": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "full_name": {
          "nulls": 0,
          "distinct": 247,
          "min": "Alice Brown",
          "max": "Zoe Almeida"
        },
        "email": {
          "nulls": 0,
          "distinct": 249
        },
        "city": {
          "nulls": 21,
          "distinct": 61,
          "min": "Amsterdam",
          "max": "Zurich"
        },
        "country": {
          "nulls": 24,
          "distinct": 43,
          "min": "Argentina",
          "max": "United States"
        }
      }
    },
    "returns": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 225,
          "min": 1,
          "max": 250
        },
        "product_id": {
          "nulls": 0,
          "distinct": 186,
          "min": 1,
          "max": 200
        },
        "return_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "completed",
          "max": "rejected"
        },
        "return_date": {
          "nulls": 171,
          "distinct": 215,
          "min": "2023-01-01",
          "max": "2023-12-30"
        }
      }
    },
    "products": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "product_name": {
          "nulls": 0,
          "distinct": 163,
          "min": "Classic Blender",
          "max": "Wireless Umbrella"
        },
        "category": {
          "nulls": 0,
          "distinct": 4,
          "min": "clothing",
          "max": "toys"
        },
        "price": {
          "nulls": 109,
          "distinct": 91,
          "min": 14.33,
          "max": 497.68
        }
      }
    },
    "payment_methods": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "method_name": {
          "nulls": 0,
          "distinct": 4,
          "min": "bank_transfer",
          "max": "paypal"
        }
      }
    },
    "shipment_history": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "return_id": {
          "nulls": 0,
          "distinct": 227,
          "min": 1,
          "max": 499
        },
        "tracking_number": {
          "nulls": 38,
          "distinct": 262
        },
        "shipment_date": {
          "nulls": 29,
          "distinct": 271,
          "min": "2023-01-03 12:41:04",
          "max": "2023-12-31 08:51:49"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/logistics-return-management/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/csv/customers.csv",
      "bytes": 14092,
      "sha256": "af731e2228d987d1062399edea184292dd80e596418642efd89a8ae1a9de44a9",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payment_methods.csv",
      "format": "csv",
      "table": "payment_methods",
      "key": "datasets/logistics-return-management/v1/csv/payment_methods.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/csv/payment_methods.csv",
      "bytes": 1273,
      "sha256": "99dc5a736d3cfddc7869efd426320f671d291f130f0128e951571c9417915ba2",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/logistics-return-management/v1/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/csv/products.csv",
      "bytes": 6136,
      "sha256": "51ff7563c1df932233547e424a8b1051771122d232111ea19d8b1b003b853776",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/returns.csv",
      "format": "csv",
      "table": "returns",
      "key": "datasets/logistics-return-management/v1/csv/returns.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/csv/returns.csv",
      "bytes": 14223,
      "sha256": "0065208433d2e7c459000c0aa78cff66ddb3c39290cf6bbbb3aa0f22738cf192",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shipment_history.csv",
      "format": "csv",
      "table": "shipment_history",
      "key": "datasets/logistics-return-management/v1/csv/shipment_history.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/csv/shipment_history.csv",
      "bytes": 17750,
      "sha256": "ce2f3c711b0ee1cfda1a5755ea349458e414659fddb97f462ec43a2fa04e82d3",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "logistics-return-management.json",
      "format": "json",
      "table": null,
      "key": "datasets/logistics-return-management/v1/logistics-return-management.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/logistics-return-management.json",
      "bytes": 189550,
      "sha256": "7f21e012c42d0bfb8e760630c217bbca5e1c46fa93d2cbd1417a1f1ff1814d75",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/logistics-return-management/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/sql/postgres.sql",
      "bytes": 76129,
      "sha256": "de4c376d13d9db668c1c792e5003f846cca5e2665f72b5c158818cdca6b39043",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/logistics-return-management/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/sql/mysql.sql",
      "bytes": 75559,
      "sha256": "dc90f4cf303d4a46e3433af621579efa300d7d19200bcdb7a404afc70fb19b28",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/logistics-return-management/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/sql/mssql.sql",
      "bytes": 78728,
      "sha256": "0be830e6b03a324df91bfa5058cf318429c0e6adc721a9f06584576904eb6e07",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/logistics-return-management/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/sql/sqlite.sql",
      "bytes": 75365,
      "sha256": "452819f0cf1eb4bea5261053bf79e3d3a8aeff884b40b0cb5208ea931148c817",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/logistics-return-management/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/prisma/seed.ts",
      "bytes": 151469,
      "sha256": "17ee70ce1bca160620521123753909c9cccbbcfb728e43f0437e46309bca9cab",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/logistics-return-management/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/logistics-return-management/v1/django/fixtures.json",
      "bytes": 248154,
      "sha256": "46bb86586c618ef6bd99127701a1315f66a17997b968eda266c9cccd0f5756ba",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768762940,
  "updatedAt": 1788768762940
}
