那如果要不重复的,就要把分组去掉,语句改成:
select count(Distinct Class)as Class from ClassDate where Machine='020-C03' and DateTime='2014-7-18'