本文介绍了LINQ查询所需的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户表中有一些列(如下所述)

CNo城市类型ResNo金额
------- ------ -------- -------- ---------
1 NY CK NULL $ 220
2 NY CK 123 $ 220
3 NY CJ NULL $ 330
4 NY CJ 456 $ 330
5 NY CJ 789 $ 330


预期是---

城市/类型TotalCust总计TotalRes剩余LeftRes ResAmount Res%
--------- --------- ----- --------- ------- ---------- ----
NY-CK 2 440 1 1 220 50%
纽约州立法院3 990 2 1 660 66.66%
----- ------
1430 880

是linq sql的新功能,非常感谢.谢谢

I have some columns(as mentioned below) in my table Customers

CNo City Type ResNo Amount
------- ------ -------- -------- ---------
1 NY CK NULL $220
2 NY CK 123 $220
3 NY CJ NULL $330
4 NY CJ 456 $330
5 NY CJ 789 $330


What is expected is ---

City/Type TotalCust Total TotalRes LeftRes ResAmount Res%
--------- --------- ----- --------- ------- --------- ------
NY-CK 2 440 1 1 220 50%
NY-CJ 3 990 2 1 660 66.66%
----- ------
1430 880

M new to linq sql, any help would be aapreciated.Thanks

推荐答案




这篇关于LINQ查询所需的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 02:26