title: Group by percentage in LINQ
body: <p>I try to create the following SQL query in LINQ to use in my ASP MVC project:</p>
  
  <pre><code>SELECT State, (Count(a.State)* 100 / (Select Count(*) From myTable))
  FROM myTable a
  GROUP BY a.State
  </code></pre>
  
  <p>What I have so far:</p>
  
  <pre><code>var data = db.myTable.GroupBy(fu =&gt; fu.State)
          .Select(g =&gt; new { Label = g.Key, Value = g.Key * 100 / g.Count() })
          .ToList();
  </code></pre>
  
  <p>The calculation is not correct. Have to get LINQ producing the same results as SQL?</p>