select max(FCLASS),FSCORE from table
where FCLASS in (select FCLASS,count(FID) from table having count(FID)>30 group by FCLASS)
楼上的两条语句都无法运行,原因是FCLASS in (select FCLASS,count(FID) from table having count(FID)>30 group by FCLASS),fclass是一个返回值,但是括号中的字段是两个,所以会执行不成功,有语法问题
select a.FCLASS,max(a.FSSCORE) from table a, (select FCLASS,count(FID)
from table
having count(FID)>30
group by FCLASS) b
where a.FCLASS=b.FCLASS
group by a.FCLASS
帮muqiao520 补充一下,少了个group by. ^_^
select max(FCLASS),FSCORE
from
table
where
FCLASS in (select FCLASS,count(FID)
from table
having count(FID)>30
group by FCLASS)
group by FCLASS
select FCLASS,FSSCORE from table where count(FID)>30 GOURP BY FSSCORE;
Select FCLASS,Max(FSSCORE) From Table
Group By FCLASS Having Count(FID)>30
好像就这样就行了。