E-commerce orders & returns
===========================

An online marketplace selling across India: customers, a product catalogue, orders with line items, and the returns that follow. Order volume spikes in the Diwali and Republic Day sale weeks; fashion is returned far more often than groceries.

Category: Retail
Licence: CC0-1.0
Synthetic data generated by DataStride. Places and calendars are real; people and businesses are fictional.
Build: 940aea8e3b2c8169

ecm_customers (600 rows)
  customer_id            INTEGER        [key] Customer identifier.
  full_name              VARCHAR(80)    Customer name (fictional).
  email                  VARCHAR(120)   Contact email; always @example.com.
  city                   VARCHAR(40)    Delivery city.
  state                  VARCHAR(40)    State of the delivery city.
  city_tier              INTEGER        1 = metro, 2 = large city, 3 = smaller city.
  signup_date            DATE           Date the account was created.
  is_prime               INTEGER        1 if the customer pays for the fast-delivery membership.

ecm_products (250 rows)
  product_id             INTEGER        [key] Product identifier.
  category               VARCHAR(30)    Top-level category.
  product_name           VARCHAR(80)    Product name.
  list_price             DECIMAL(10,2)  Listed price in INR before discounts.
  seller_city            VARCHAR(40)    City the seller ships from.
  launched_on            DATE           Date the product was listed.

ecm_orders (3500 rows)
  order_id               INTEGER        [key] Order identifier.
  customer_id            INTEGER        -> ecm_customers.customer_id Who placed the order.
  order_date             DATE           Date the order was placed. Peaks in sale weeks.
  channel                VARCHAR(10)    Where the order was placed.
  payment_method         VARCHAR(12)    How it was paid for.
  coupon_code            VARCHAR(20)    Coupon applied, if any.
  status                 VARCHAR(12)    Current order status.
  delivered_date         DATE           Delivery date; null unless delivered.

ecm_order_items (5000 rows)
  item_id                INTEGER        [key] Line identifier.
  order_id               INTEGER        -> ecm_orders.order_id Order this line belongs to.
  product_id             INTEGER        -> ecm_products.product_id Product bought.
  quantity               INTEGER        Units bought.
  unit_price             DECIMAL(10,2)  List price at the time of the order, INR.
  discount_pct           DECIMAL(5,2)   Discount applied to this line, percent.

ecm_returns (420 rows)
  return_id              INTEGER        [key] Return identifier.
  item_id                INTEGER        -> ecm_order_items.item_id Order line being returned.
  reason                 VARCHAR(30)    Reason the customer gave.
  requested_date         DATE           When the return was requested; within ten days of delivery.
  refund_amount          DECIMAL(10,2)  Refund paid, INR.

Deliberate data-quality quirks (clean them before you aggregate):
  ecm_customers.city: mixed case
  ecm_orders.payment_method: trailing space
