If I have a table like this:
pkey age ---- --- 1 8 2 5 3 12 4 12 5 22
I can \"group by\" to get a count
Can you try the below solution:
SELECT count (1), '1-10' where age between 1 and 10 union all SELECT count (1), '11-20' where age between 11 and 20 union all select count (1), '21+' where age >20 from age