title: Help with NHibernate Criteria query groupby property
body: <p>I have the below query,</p>
  
  <pre><code>SearchTemplate Template = new SearchTemplate();
              Template.Criteria = DetachedCriteria.For(typeof(table1));
  
              Template.Criteria.CreateCriteria("table2", "Usr", NHibernate.SqlCommand.JoinType.InnerJoin)
  
                   .SetProjection(Projections.ProjectionList()
                   .Add(Projections.Count("Usr.ID"), "UserCount")
                    .Add(Projections.GroupProperty("Location"), "ALocation")
                    .Add(Projections.GroupProperty("Company"), "ACompany")
                    .Add(Projections.GroupProperty("Usr.Designation"), "ADesignation"));  
  </code></pre>
  
  <p>The above query gives me data as,</p>
  
  <pre><code>Location   Company    Designation   Count
    Florida      A          Manager       3
    Florida      A          QA            5
    Texas        B          Manager       6
    Texas        B          QA            7
  </code></pre>
  
  <p>Is there a way to change the query so that it gives data as,</p>
  
  <pre><code>  Location   Company    Manager    QA               
    Florida      A           3       5
    Texas        B           6       7
  </code></pre>
  
  <p>Here Manager and QA are the only possible values that can go into Designation field..</p>