select count(*) from rk0207 where 年龄>=10 and 年龄<20
select * from rk0207 where floor(年龄/10)=0 and 身份证 not in (select 身份证 from rk0207 where 年龄>=0 and 年龄<10)
--按照年龄段进行分组,10为分段基数。如果为10.0,则可以年龄小于0的进行独立分组。
select floor(年龄/10) age,count(年龄) from rk0207 group by floor(年龄/10)
select count(*) from rk0207 where floor(年龄/10.0)=0
select count(*) from rk0207 where 年龄>=0 and 年龄<10