自定义报表,幢建筑面积分层汇总,想要统计每一层未分摊的建筑面积,如何写这个sql语句?
现在依据模板的语句是SELECT shisFloors.FloorName,shisFloors.FloorNO, shisFloors.ArchArea, shisFloors.SetInArea,shisFloors.PubArea,ytmjtb.ytmj FROM shisFloors left join (select FloorID,sum(validarea) 'ytmj' from shisentities where ispubuse = 0 AND ALName LIKE '%台%' GROUP BY FloorID) ytmjtb ON shisFloors.ID = ytmjtb.floorid WHERE shisFloors.BuildingID = [BUILDID] order by shisFloors.FloorNO
想再加上每一层未分摊的建筑面积,怎么修改这个sql?
全部评论