SELECT order_num, COUNT(order_num) order_lines FROM OrderItems GROUP BY order_num ORDER BY order_lines;