标签:blog os ar 2014 div log on c sql
Use Basket select convert(varchar(7),Orderdate,120) as YearMonth ,OrderID ,TotalCost into #a from Basket.dbo.BaseOrderTracker(nolock) where OrderDate >=‘2013-07-01‘ and OrderDate <=‘2014-07-31‘ and OrderTypeID = 15 and OESourceID = 2 and StageID= 10400 select * from #a select YearMonth, COUNT(distinct OrderID), SUM(TotalCost) from #a (nolock) group by YearMonth drop table #a
标签:blog os ar 2014 div log on c sql
原文地址:http://www.cnblogs.com/monkeyfather/p/3945352.html