摘要:select count(id),sum(Price) from [T_AddPrice] as a where (select sum(Price) from [T_AddPrice] as b where a.id<=b.id)<1000 --order by id
阅读全文
posted @ 2019-01-29 14:15
|
|||
随笔分类 - Linq
摘要:select count(id),sum(Price) from [T_AddPrice] as a where (select sum(Price) from [T_AddPrice] as b where a.id<=b.id)<1000 --order by id
阅读全文
posted @ 2019-01-29 14:15
摘要:其实只要明白 LINQ查询操作符的 Distinct、Union、Concat、Intersect、Except、Skip、Take、SkipWhile、TakeWhile、Single、SingleOrDefault、Reverse、SelectMany,Aggregate()(这个挺偏的,具体意
阅读全文
posted @ 2018-06-01 14:00
摘要:假设我们需要从两张表中统计出热门商圈,这两张表内容如下: 上表是所有政区,商圈中的餐饮个数,名为FoodDistrict 下表是所有政区,商圈中的SPA个数,名为SPADistrict 现在要把这两张表,根据政区和商圈合并,然后相加Counts,根据Counts的总大小排序,统计热门商圈和热门政区。
阅读全文
posted @ 2017-03-27 15:17
|
|||