A list of the top 5 countries by number of invoices. List country name and number of invoices.
CREATE TABLE invoices (billing_country VARCHAR)
SELECT TOP 5 billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE invoices (billing_country VARCHAR) Question: A list of the top 5 countries by number of invoices. List country name and number of invoices. [/INST] SELECT TOP 5 billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC </s>