zoukankan      html  css  js  c++  java
  • C#中对DataTable进行全连接后group by,orderby

    var result = from temp2 in
                                 (
                                     from u in users.Tables[0].AsEnumerable()
                                     join s in hpcSummary.Tables[0].AsEnumerable() on u.Field<String>("DomainUser") equals s.Field<String>("CountObj")
                                     select new
                                     {
                                         SolverName = s.Field<String>("Solver"),
                                         CountObj = s.Field<String>("CountObj"),
                                         NumJob = s.Field<Int64>("Jobs"),
                                         CpuTime = s.Field<Double>("TotalCPUTime")
                                     }
                                )
                             orderby temp2.NumJob descending
                             group temp2 by new { SolverName = temp2.SolverName } into temp3
                             select new
                             {
                                 SolverName = temp3.Key.SolverName,
                                 NumJob = temp3.Sum(t => t.NumJob),
                                 CpuTime = temp3.Sum(t => t.CpuTime)
                             };

  • 相关阅读:
    Python sendemail txt,html,图片及附件
    python 3 requests库2个问题
    py37 unitest+html_sendmail
    python 3 unitest批量执行用例
    phthon 3 unittest模块使用
    python 之发送邮件
    ipad已停用 连接itunes怎么办
    Ubuntu 16.04系统挂载4T硬盘
    华硕RT-AC86U路由器 AP模式实现多路由器组网,扩展主路由器的无线网范围
    ubuntu 常用命令
  • 原文地址:https://www.cnblogs.com/johnblogs/p/6958354.html
Copyright © 2011-2022 走看看