{
  "format": "dataset-manifest/1",
  "slug": "virtual-shopping-dynamics",
  "version": 2,
  "seed": "virtual-shopping-dynamics:1",
  "spec": {
    "format": "dataset/1",
    "slug": "virtual-shopping-dynamics",
    "name": "Virtual Shopping Dynamics",
    "tagline": "Customer interactions, product listings, and order details from an online retail app.",
    "description": "Customers browse the online retail app, exploring a diverse selection of products across various categories. They can compare prices, read reviews, and ultimately decide on purchases, all while enjoying a seamless shopping experience. The app facilitates order processing and payment transactions, ensuring that customers receive their items promptly. Popular categories like electronics and apparel see high volumes of sales, while luxury goods attract more selective buyers, leading to interesting patterns in purchasing behavior. Seasonal trends play a significant role in shaping sales, as spikes during holiday periods highlight shifts in consumer demand.\n\nThe dataset consists of several interrelated tables: the customers table captures individual user data, such as demographics and shopping preferences, while the products table details the items available for purchase, including specifications and pricing. Categories group these products into meaningful segments, enabling better navigation and tailored marketing strategies. The orders table tracks each transaction, noting the customer involved and the total cost, while the order_items table breaks down individual items within those orders, linking back to both the products and the orders.\n\nOne row in the customers table represents a unique shopper, containing personal information that can help analyze buying habits. Each product row details a specific item, including its category and availability. The orders table tracks the entirety of a customer's purchase activity, while order_items connects individual products to those orders, revealing what customers are purchasing together.\n\nWith this dataset, developers can practice various analytical techniques such as customer segmentation, sales forecasting, and trend analysis. They can investigate questions such as which categories perform best during different seasons, what combination of products often leads to larger orders, or how customer demographics influence purchasing behavior. Note that the data in this dataset is synthetic, designed to mimic real-world scenarios for training and development purposes.",
    "domain": "ecommerce",
    "shape": "hierarchical",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "online retail",
      "customer behavior",
      "product categories",
      "sales trends",
      "order processing"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "This table represents customers who interact with the online retail app. Each row contains unique customer information, linking to their orders.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "first_name": {
            "kind": "firstName",
            "description": "Customer's first name.",
            "nullable": true
          },
          "last_name": {
            "kind": "lastName",
            "description": "Customer's last name.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "Customer's email address.",
            "nullable": true
          },
          "registration_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the customer registered.",
            "trend": "growing"
          }
        }
      },
      "products": {
        "description": "This table lists products available in the online retail app. Each row provides details about a product and links to its category.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each product."
          },
          "name": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "Name of the product.",
            "pool": [
              "gadget",
              "widget",
              "accessory",
              "tool",
              "device",
              "item",
              "appliance",
              "gizmo",
              "gear",
              "product",
              "thing",
              "novelty",
              "furniture",
              "electronics",
              "apparel",
              "footwear",
              "jewelry",
              "kitchenware",
              "decor",
              "stationery",
              "toys"
            ]
          },
          "category_id": {
            "kind": "fk",
            "ref": "categories.id",
            "description": "Identifier linking to the product category."
          },
          "price": {
            "kind": "decimal",
            "min": 5,
            "max": 5000,
            "scale": 2,
            "description": "Price of the product.",
            "nullable": true,
            "distribution": "long-tail"
          },
          "stock_quantity": {
            "kind": "int",
            "min": 0,
            "max": 100,
            "description": "Current stock level of the product.",
            "nullable": true
          }
        }
      },
      "categories": {
        "description": "This table contains product categories, grouping products into relevant sections. Each category can have multiple products linked to it.",
        "rows": 20,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each category."
          },
          "name": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "Name of the product category.",
            "pool": [
              "electronics",
              "home",
              "clothing",
              "toys",
              "furniture",
              "sports",
              "beauty",
              "health",
              "automotive",
              "books",
              "music",
              "video",
              "games",
              "grocery",
              "accessories",
              "jewelry",
              "outdoor",
              "kitchen",
              "office",
              "pets",
              "hobbies"
            ]
          }
        }
      },
      "orders": {
        "description": "This table captures customer orders, linking customers to the products they purchase. Each order may consist of multiple products.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "Identifier linking to the customer who placed the order."
          },
          "order_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date and time when the order was placed.",
            "dayProfile": "waking"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 5,
            "max": 5000,
            "scale": 2,
            "description": "Total amount for the order.",
            "nullable": true,
            "distribution": "long-tail"
          }
        }
      },
      "order_items": {
        "description": "This table details the individual items within each order, linking orders to the products purchased. Each order can have multiple items.",
        "rows": 600,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order item."
          },
          "order_id": {
            "kind": "fk",
            "ref": "orders.id",
            "description": "Identifier linking to the order."
          },
          "product_id": {
            "kind": "fk",
            "ref": "products.id",
            "description": "Identifier linking to the purchased product."
          },
          "quantity": {
            "kind": "int",
            "min": 1,
            "max": 10,
            "description": "Quantity of the product ordered.",
            "nullable": true,
            "distribution": "long-tail"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What product categories generate the most revenue?",
      "How does customer registration date affect purchasing frequency?",
      "Which products are most frequently purchased together?",
      "What is the average order value across different customer demographics?",
      "During which months do sales peak, and what might contribute to that?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Orders",
        "sql": "SELECT c.first_name, c.last_name, o.order_date FROM customers c JOIN orders o ON c.id = o.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Total Revenue per Category",
        "sql": "SELECT cat.name, SUM(oi.quantity * p.price) AS total_revenue FROM order_items oi JOIN products p ON oi.product_id = p.id JOIN categories cat ON p.category_id = cat.id GROUP BY cat.name;",
        "dialect": "postgres"
      },
      {
        "title": "Average Order Amount by Customer",
        "sql": "SELECT c.id, AVG(o.total_amount) AS avg_order FROM customers c JOIN orders o ON c.id = o.customer_id GROUP BY c.id;",
        "dialect": "postgres"
      },
      {
        "title": "Monthly Sales Trends",
        "sql": "SELECT DATE_TRUNC('month', o.order_date) AS month, SUM(o.total_amount) AS total_sales FROM orders o GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "E-commerce Analysis",
        "body": "Data analysts working in e-commerce can use this dataset to study consumer behavior, identifying trends and patterns in product purchases. By querying the dataset, they can discover which categories are performing well and how seasonality affects sales."
      },
      {
        "title": "Teaching SQL",
        "body": "Instructors can utilize this dataset to teach SQL and database concepts. The interconnected tables allow students to practice JOIN operations, aggregations, and complex queries, gaining hands-on experience while learning."
      },
      {
        "title": "Product Performance Review",
        "body": "Product managers can leverage this data to evaluate product performance within different categories. By analyzing sales data, they can identify underperforming products and strategize on improving their visibility or adjusting pricing."
      },
      {
        "title": "Marketing Campaign Effectiveness",
        "body": "Marketing teams can analyze customer orders to assess the effectiveness of campaigns targeted at specific demographics. By examining how registration dates correlate with purchasing behavior, they can refine their marketing strategies."
      }
    ]
  },
  "counts": {
    "categories": 20,
    "customers": 300,
    "orders": 400,
    "products": 150,
    "order_items": 600
  },
  "stats": {
    "customers": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "first_name": {
          "nulls": 32,
          "distinct": 77,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 35,
          "distinct": 78,
          "min": "Adams",
          "max": "Zhang"
        },
        "email": {
          "nulls": 32,
          "distinct": 263
        },
        "registration_date": {
          "nulls": 0,
          "distinct": 267,
          "min": "2020-01-13",
          "max": "2023-12-27"
        }
      }
    },
    "products": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "name": {
          "nulls": 0,
          "distinct": 119
        },
        "category_id": {
          "nulls": 0,
          "distinct": 20,
          "min": 1,
          "max": 20
        },
        "price": {
          "nulls": 17,
          "distinct": 133,
          "min": 5.15,
          "max": 4959.59
        },
        "stock_quantity": {
          "nulls": 12,
          "distinct": 81,
          "min": 0,
          "max": 99
        }
      }
    },
    "categories": {
      "rows": 20,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 20,
          "min": 1,
          "max": 20
        },
        "name": {
          "nulls": 0,
          "distinct": 20
        }
      }
    },
    "orders": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 215,
          "min": 1,
          "max": 300
        },
        "order_date": {
          "nulls": 0,
          "distinct": 400,
          "min": "2022-01-01 01:36:43",
          "max": "2023-12-31 21:20:35"
        },
        "total_amount": {
          "nulls": 45,
          "distinct": 355,
          "min": 5.01,
          "max": 4971.53
        }
      }
    },
    "order_items": {
      "rows": 600,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 600,
          "min": 1,
          "max": 600
        },
        "order_id": {
          "nulls": 0,
          "distinct": 296,
          "min": 1,
          "max": 400
        },
        "product_id": {
          "nulls": 0,
          "distinct": 144,
          "min": 1,
          "max": 150
        },
        "quantity": {
          "nulls": 67,
          "distinct": 10,
          "min": 1,
          "max": 10
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/categories.csv",
      "format": "csv",
      "table": "categories",
      "key": "datasets/virtual-shopping-dynamics/v2/csv/categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/csv/categories.csv",
      "bytes": 393,
      "sha256": "fe64994b598eb25abbda419e167ba4ccb9028eb733ad689204ff6f182523d11c",
      "rows": 20,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/virtual-shopping-dynamics/v2/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/csv/customers.csv",
      "bytes": 14497,
      "sha256": "08daf7098add195300ebf71a7c3150f8d5c99fe768073d3790dee3e7b9d78e8e",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/orders.csv",
      "format": "csv",
      "table": "orders",
      "key": "datasets/virtual-shopping-dynamics/v2/csv/orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/csv/orders.csv",
      "bytes": 14062,
      "sha256": "e4594bd504817e6b84116aabec771ea84dea39fb761cddd9ab9a2d4e81df4e29",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/virtual-shopping-dynamics/v2/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/csv/products.csv",
      "bytes": 4979,
      "sha256": "048eca34ba44342bdd4667942b5385ba1da0d8c157fd9e0b152c6749fa06cb64",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/order_items.csv",
      "format": "csv",
      "table": "order_items",
      "key": "datasets/virtual-shopping-dynamics/v2/csv/order_items.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/csv/order_items.csv",
      "bytes": 8284,
      "sha256": "b477052efda2ab93f3cd01b91bccda512dcf43dc25e55f505d7a41894d5c0feb",
      "rows": 600,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "virtual-shopping-dynamics.json",
      "format": "json",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/virtual-shopping-dynamics.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/virtual-shopping-dynamics.json",
      "bytes": 180949,
      "sha256": "f84d1c806140a04b766813ca6d2bd15674700f34a51f6bd75854e8e9cc3a8a87",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/sql/postgres.sql",
      "bytes": 62924,
      "sha256": "2d86e08cab8ecef4efb958c071fcc448ac7899587e3c506d50558231d40cd6b4",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/sql/mysql.sql",
      "bytes": 62360,
      "sha256": "e44d0c78c1257dbba2a0513228e52b19467085227ba3a6714b862d18eb580961",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/sql/mssql.sql",
      "bytes": 64350,
      "sha256": "a1780fb692f0e7ca78d41528433bb93d76ee4ec0bb45c9417954e4deec0f9d7e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/sql/sqlite.sql",
      "bytes": 62178,
      "sha256": "a1e88d19cb98a8cfa3883d4ae7aa3276c1c077b5f9a071ba09f3bcf79cef476f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/prisma/seed.ts",
      "bytes": 142981,
      "sha256": "46d3c18db81899dab3b2dfdbe379ca52e698fad5fe8b0967ebf05c2f3d7a8dc5",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/virtual-shopping-dynamics/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/virtual-shopping-dynamics/v2/django/fixtures.json",
      "bytes": 242453,
      "sha256": "a15082e6431d52f98db2acbcba88377a65e9dcf25ff01c641bbecccd0a754958",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767554975,
  "updatedAt": 1788786828454
}
