您可以在下面的查询中使用,但是
will not show thegaps如果您要保留空白,请使用Linoff的答案:
select t.txt, count(t.age) from (select case when age<11 then concat(age ,' year') else 'more than 10' end txt, agefrom your_table)tgroup by t.txtorder by 1
SQL FIDDLE DEMO

您可以在下面的查询中使用,但是
will not show thegaps如果您要保留空白,请使用Linoff的答案:
select t.txt, count(t.age) from (select case when age<11 then concat(age ,' year') else 'more than 10' end txt, agefrom your_table)tgroup by t.txtorder by 1
SQL FIDDLE DEMO