Order
Tables (5)
lu_customer
- customer_id — int4 — Primary key — NOT NULL
- cust_last_name — varchar(255)
- cust_first_name — varchar(255)
- gender_id — int4
- cust_birthdate — timestamp
- email — varchar(255)
- address — varchar(255)
- zipcode — varchar(255)
- income_id — int4
- cust_city_id — int4
- age_years — float8
- agerange_id — int4
- first_order — timestamp
- last_order — timestamp
- recency — float8
- status_id — int4
lu_day
- day_date — timestamp — Primary key — NOT NULL
- month_id — int4
- quarter_id — int2
- year_id — int2
- prev_day_date — timestamp
- lm_day_date — timestamp
- lq_day_date — timestamp
- ly_day_date — timestamp
lu_shipper
- shipper_id — int2 — Primary key
- shipper_desc — varchar(50)
- contract_nbr — int4
order_detail
- order_id — int4 — Foreign key → order_fact.order_id — NOT NULL
- item_id — int2 — Foreign key — NOT NULL
- qty_sold — numeric
- unit_price — numeric
- unit_cost — numeric
- discount — numeric
- order_date (day_date) — timestamp — Foreign key → lu_day.day_date — NOT NULL
- customer_id — int4 — Foreign key → lu_customer.customer_id — NOT NULL
- emp_id — int2 — Foreign key — NOT NULL
- promotion_id (promotion_id2) — int4 — Foreign key — NOT NULL
order_fact
- order_id — int4 — Primary key — NOT NULL
- order_amt — numeric
- order_cost — numeric
- qty_sold — numeric
- freight — numeric
- ship_date — timestamp
- rush_order — varchar(50)
- pymt_type — int2
- gross_dollar_sales — numeric
- customer_id — int4 — Foreign key → lu_customer.customer_id — NOT NULL
- order_date (day_date) — timestamp — Foreign key → lu_day.day_date — NOT NULL
- emp_id — int2 — Foreign key — NOT NULL
- shipper_id (shipper_id2) — int2 — Foreign key → lu_shipper.shipper_id