I can't seem to get my head wrapped around this one ...
example: assuming table has 25 names with their ages
I simply want a count for each age group
between 1-10 as 10
between 11-20 as 20
between 21-30 as 30
So essentially the result with return Three columns with a count for each group.
10 20 30
-------------
11 5 9
I tried variations of ... SELECT COUNT(*) FROM Persons WHERE Age>20
Any help would be appreciated.
Thank you
n.b. the data may not make sense and that's ok, I'm only trying to understand how to group things
example: assuming table has 25 names with their ages
I simply want a count for each age group
between 1-10 as 10
between 11-20 as 20
between 21-30 as 30
So essentially the result with return Three columns with a count for each group.
10 20 30
-------------
11 5 9
I tried variations of ... SELECT COUNT(*) FROM Persons WHERE Age>20
Any help would be appreciated.
Thank you
n.b. the data may not make sense and that's ok, I'm only trying to understand how to group things