摘要:
--按照月份统计select count(id) cnt,datepart(mm,time) [Month]from [table]where [time] between '2007/09/08 09:10:43' and '2007/10/09 04:32:37'group by datepart(mm,time)--按照日统计select count(id) cnt,datepart(dd,time) [Day]from [table]where time between '2007/09/08 09:10:43' and '200 阅读全文
摘要:
子查询描述:查询订单数超过5的顾客信息查询句法:var 子查询 = from c in ctx.Customers where (from o in ctx.Orders group o by o.CustomerID into o where o.Count() > 5 select o.Key).Contains(c.CustomerID) select c; in 操作描述:查询指定城市中的客户查询句法:var in操作 = from c in ctx.Customers... 阅读全文