select iif(tave<0.4,"<0.4",iif(tave>=0.4 and tave<0.45,">=0.4 and <0.45",">0.45")) as 项目,count(项目) as 计数
from tbname
group by iif(tave<0.4,"<0.4",iif(tave>=0.4 and tave<0.45,">=0.4 and <0.45",">0.45"))
例如:
SELECT 表达式1 AS 数据期间,COUNT(表达式1) AS 数据个数 FROM
(SELECT 表6.时间, 表6.数量, IIf([数量]>=0.9,">=0.9",IIf([数量]>=0.7,">=0.7",IIf([数量]>=0.4,">=0.4",IIf([数量]>=0.2,">=0.2","<0.2")))) AS 表达式1
FROM 表6)
GROUP BY 表达式1 ;