title: Nested Group by LINQ
body: <p>I am unable to solve this problem with the LINQ Query. </p>
  
  <p>So we have the table structure as follows:
     Id || bug_category || bug_name || bug_details || bug_priority</p>
  
  <p>I want to group by bug_category first. For each bug_category, I want to in turn group by bug__priority.</p>
  
  <p>So basically I want something like :</p>
  
  <p>bug_category = AUDIO ::  No of BUGS -->   Critical = 3, Medium = 2 and Low = 7 bugs.<br>
     bug_category = VIDEO ::  No of BUGS -->   Critical = 5, Medium = 1 and Low = 9 bugs.</p>
  
  <p>The below query returns all unique combinations of category AND customer_priority:</p>
  
  <p>(where <strong>RawDataList</strong> is simply a List of data which has the above mentioned structure )</p>
  
  <pre><code>        var ProceesedData = from d in RawDataList
                        group d by new { d.bug_category, d.bug_priority } into g
                        select new
                        {
                            g.Key.bug_category,
                            g.Key.bug_priority
                        };
  </code></pre>
  
  <p>The below query returns the category followed by a list of records in that category:</p>
  
  <pre><code>            var ProceesedData = from d in RawDataList
                        group d by d.bug_category into g
                        select new { g.Key, records = g
                        };
  </code></pre>
  
  <p>But I am unable to proceed further as ProcessedData(the return variable) is an unknown type. Any thoughts on this?</p>