select count(*),left(a,1) from table group by left(a,1)
这里假设这个字段名称为a了,表名为table,
请根据你的实际情况修改一下即可.
设table1字段col1
select ..... from table1 group by left(col1,1)
select * from table group by where id like 'x%'
select ..... from table1 group by subsrting(col1,1,1)
我赞成muqiao520这们朋友的做法,很好