Database: e_commerce
Question: For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.
SQL:
SELECT T1.order_id ,  T1.order_status_code ,  count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id