title: LINQ with Multiple GroupJoin
body: <p>Imagine the following case:</p>
  
  <p>Each Player (an entity) can engage in any number of Attacks (an entity). An attack may result in a Kill (an entity). Attack.Player maps to the player involved in the attack. Kill.Attack maps to the attack that resulted in the kill. Thus, Kill.Attack.Player will map a kill to a player.</p>
  
  <p>I want to produce the following report:
  Player A made 10 attacks resulting in 7 kills.
  Player B made 8 attacks resulting in 4 kills.
  Player C made 0 attacks resulting in 0 kills.</p>
  
  <p>How can I do so using LINQ? I thought I'd be able to do:</p>
  
  <pre><code>from player in Players
  join attack in Attacks on player equals attack.Player into attacksByPlayer
  join kill in Kills on attack equals kill.Attack into killsByPlayer
  select new { Player = player, Attacks = attacksByPlayer.Count(), Kills = killsByPlayer.Count() }
  </code></pre>
  
  <p>Clearly, this is incorrect for various reasons (and won't build). </p>
  
  <p>Also, how would I create the same report, but using an inner join where Player C would not be reported because he had no attacks?</p>
  
  <p>Thank you so much for any help!</p>