Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
select Name,openissues,TotalIssues,((openissues*100)/TotalIssues) as IssuePerc
from(
select Agencies.Name as Name,count(Agencies.Name)as openissues,
(select COUNT(*) from BackToOperations where IsResolved =0)as TotalIssues
from Agencies
join Claims
on Agencies.AgencyId=Claims.AgencyId
join BackToOperations
on Claims.ClaimId =BackToOperations.ClaimId
where IsResolved =0
group by Agencies.Name,IsResolved
) as X
Posted
Updated 14-Jan-14 14:37pm
v2
Comments
walterhevedeich 14-Jan-14 20:38pm    
Have you tried anything?

Help yourself to this: http://www.sqltolinq.com/[^]
or
Learn it yourself: converting-sql-to-linq-part-1[^]
 
Share this answer
 
v3
Use LINQPad[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900