I have the following LINQ-to-Entities query...from r in ctx.Rs
join p in ctx.Ps on r.RK equals p.RK
group r by r.QK into gr
select new { QK = (int)gr.Key, Num = gr.Count() }
...that runs against this schema...Table P Table R Table Q
PK*
RK ----> RK*
...