正所谓一口吃不成胖子。如果一条语句写不出来可以分成多条语句呀。
可以写一个存储过程呀:For Example
Select 品名,Convert(float,0) 本月数量 Into #Test From Card
Select 品名,Sum(数量) 数量 Into #Test1 From Enter Grop By 品名
Update #Test Set 本月数量=数量 From #Test Where #Test.品名=#Test1.品名
Select * From #Test Order by 品名
可以通过上面思路做下去