今天用实例总结一下group by的用法. 归纳一下:group by:ALL ,Cube,RollUP,Compute,Compute by 创建数据脚本 Create Table SalesInfo(Ctiy nvarchar(50),OrderDate datetime,OrderID int) insert into SalesInfoselect N'北京','2014-06-09',1001union allselect N'北京','2014-08-09',1002union a…