Skip to content
Advertisement

How to count total number of patients in a certain age group

table picture

Hello I would like to ask how can I have the total number of patients in certain distinct age groups using queries?

Advertisement

Answer

In MySQL. In other DBMS similarly, but you must precise what you use.

SELECT AgeGroup, COUNT(*) FROM Table GROUP BY AgeGroup ORDER BY AgeGroup.
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement