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'