Task: Text to Code
Input (English): SQL: SELECT Avg ( T2.Order_Quantity ) FROM Invoices AS T1 JOIN Invoice_Items AS T2 ON T1.Invoice_ID = T2.Invoice_ID WHERE T1.payment_method_code = "MasterCard"
Feedback: The required parameter is Invoices' order quantity , not Invoice Items's order quantity in step 2.
Output (English): SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code  =  "MasterCard"