haitao: 应该不算复杂。。。 [阅读: 348] 2006-04-25 14:36:16 select f3,count(1) fc from ( select case when f2<=10 then '0-10' when f2>10 and f2<=15 then '10-15' when f2>15 and f2<=20 then '15-20' ... end f3,f1 from tb )a group by f3