Show all payment method codes and the number of orders for each code.
CREATE TABLE INVOICES (payment_method_code VARCHAR)
SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE INVOICES (payment_method_code VARCHAR) Question: Show all payment method codes and the number of orders for each code. [/INST] SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code </s>