The conversation between human and AI assistant.
How do I write query to display the name of the company that manufactures the most number of medications?
Okay, but what if I want to display the number of medications that company manufactures as well?
You can modify the query to show the number of medications manufactured by the company by adding a COUNT(*) column to the SELECT statement like this:

SELECT TOP 1 CompanyName, COUNT(*) AS TotalMedications
FROM Medications
GROUP BY CompanyName
ORDER BY COUNT(*) DESC;

This query will display both the name of the company and the total number of medications manufactured by them.