developer pom

developer pom

  • NA
  • 6
  • 712

SQL to LINQ/LAMBDA

Jul 26 2021 7:34 AM

I want to convert below sql to linq/lambda:

select distinct t.cname,t.cyear,t.total from (
select cname,cyear,(sum(cmale)+sum(cfemale)) as total from emp group by cname,cyear) as tmpt
join (select cname,cyear,(sum(cmale)+sum(cfemale)) as total from emp group by cname,cyear) as t
on t.total>tmpt.total where t.cyear='2018' 


Answers (1)