Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (7 sloc) 210 Bytes
/*Getting the average number of items per order*/
SELECT AVG( items_num ) AS AvgItemsOrder
SELECT order_id, COUNT( item_id ) items_num
FROM `sales_flat_order_item`
GROUP BY order_id
You can’t perform that action at this time.