Magento查询历史完成订单的产品销售价格

SELECT  
  order_table.increment_id, item_table.created_at, item_table.sku, item_table.price, order_table.`status`
FROM sales_flat_order_item AS item_table  
LEFT JOIN sales_flat_order AS order_table ON order_table.entity_id=item_table.order_id  
WHERE item_table.created_at <= '2015-08-01'  and order_table.`status`='complete'
GROUP BY sku

你可能感兴趣的:(Magento)