A hospital has a patients table with columns city and patien…
A hospital has a patients table with columns city and patient_id. Administrators want to see how many patients are in each city. Which query is correct? SELECT city, COUNT(patient_id) FROM patients GROUP BY city SELECT COUNT(patient_id) FROM patients SELECT city, patient_id FROM patients GROUP BY city SELECT * FROM patients ORDER BY city Answer: SELECT city, COUNT(patient_id) FROM patients GROUP BY city Explanation: COUNT(patient_id) counts patients per city when grouped by city. Without grouping, COUNT only gives the overall total. Grouping with non-aggregated fields like patient_id is invalid, and ORDER BY city just sorts rows without summarizing.