第1个回答 2012-09-04
select typecode ,Typename, sum(shijianduan) as time,facilityid
from tablename
group by typecode ,typename,facilityid
第2个回答 2012-09-04
select FacilityId ,TypeName ,sum(shijianduan)
from table
group by FacilityId ,TypeName
第3个回答 2012-09-04
典型的聚合应用。
select TypeCode, TypeName, sum(shijianduan), FacilityId from table group by TypeCode, TypeName, FacilityId本回答被网友采纳