Magento Business Intelligence Help Center

The Sales_Flat_Order_Item Table

The sales_flat_order_item table is an order items table. Each row represents one line item included in an order.


Common Columns

Column Name Description
item_id Unique identifier for the table
qty_ordered Quantity of an item which is included in an order
price Cost of a each individual line item
name An item's name
order_id Foreign key associated with the 'sales_flat_order` table
sku An item's associated SKU
product_id Foreign key associated with the `catalog_product_entity` table
product_type Determines if the product is 'simple', 'configurable', 'bundle' or 'downloadable'


Common Calculated Columns

Column Name Description
Order item total value The `price` multiplied by `qty_ordered`
Order date The `created_at` date column from the `sales_flat_order` table. This is a joined column


Common Metrics

Click to view full list
Metric Name Metric Description Metric Construction
Items Sold Represents the quantity of items sold

Operation Column: qty_ordered 

Operation: Sum 

Timestamp Column: created_at

Revenue by item The total item value sold. As this is calculated on the line item level, shipping, taxes, and other order level costs are not included.

Operation Column: Order item total value 

Operation: Sum 

Timestamp Column: created_at



Connections to Other Tables


  • Create joined columns to segment and filter by order level attributes on the sales_flat_order_item table via the following path:
  • sales_flat_order_item.order_id (many) => sales_flat_order.entity_id (one)


  • Create joined columns related to product attributes:
  • sales_flat_order_item.product_id (many) => catalog_product_entity.entity_id (one)
Was this article helpful?
0 out of 0 found this helpful


Powered by Zendesk