<s>[INST] Write a SQL code to find the average quantity of items ordered in each order.  [/INST] SELECT AVG(order_item_quantity) AS average_item_quantity FROM order_transaction.transaction_detail_deprecated; </s>