Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group By and Join in same statement using LINQ

Status
Not open for further replies.

josemauricio

Programmer
Sep 2, 2003
65
BR
Hi guys! Sorry if it's a little off-topic, but I didn't find any specific forum for LINQ here.

Talking about my issue. Have you ever thought that you are the only one that have an specific problem in the holy world? That's what I'm thinking right now! I'm looking for an answer for this, googling a few hours and didn't find anything that really help. Ok, there it goes. Basically, I have a select statement with a join among three tables and I'd like to group by one column of a table and a column of another one and a count over a column of the third table. Here's the command:

select Ds_Nome_Cobrador, Qt_Limite_Acordos_Promessas, count(fic.id_cobrador)
from ficha_cobranca fic
join faixa_cobranca fac on fic.id_faixa_cobranca = fac.id_faixa_cobranca
join cobrador c in fic.id_cobrador = c.id_cobrador
where Id_Tipo_Ultimo_Historico in (1,2)
and id_cobrador = 1
group by Ds_Nome_Cobrador, Qt_Limite_Acordos_Promessas

Does anyone know how can I converti it to LINQ?

I'll really appreciate any sugestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top