SELECT 年龄,COUNT(年龄) FROM
(SELECT (CASE WHEN 年龄 BETWEEN 10 AND 20 then
20 WHEN 年龄 BETWEEN 20 AND 30 then
30 WHEN 年龄 BETWEEN 30 AND 40 then
40 WHEN 年龄 BETWEEN 40 AND 50 then
50 else
60 END )FROM 表)B
GROUP BY B.年龄
SELECT 年龄,COUNT(年龄) FROM
(SELECT (CASE WHEN 年龄 BETWEEN 10 AND 20 then
20 WHEN 年龄 BETWEEN 20 AND 30 then
30 WHEN 年龄 BETWEEN 30 AND 40 then
40 WHEN 年龄 BETWEEN 40 AND 50 then
50 else
60 END )FROM 表)B
GROUP BY B.年龄 我认为是这样的和第一个朋友的意相同!~~~~