title: Group by is not working on WCF Data Services
body: <p>I have this code,</p>
  
  <p>Data Summary is a class, it is not an entity. I use it for the anonymous type on "select new"</p>
  
  <pre><code>public class DataSummary
  {
      public DataSummary()
      {
      }
  
      public int AccountID
      {
          get; set;
      }
  
      public decimal Total
      {
          get; set;
      }
  }
  </code></pre>
  
  <p>then I have this query</p>
  
  <pre><code>        DateTime date1 = new DateTime(2003, 1, 1);
          DateTime date2 = new DateTime(2011, 1, 1);
  
  
          InitializeComponent();
  
          var query = (from d in svc.Data
                   where d.Date &gt;= date1 &amp;&amp; d.Date &lt;= date2
                   group d by d.AccountID into g
                   orderby g.Key
                   select new DataSummary()
                   {
                       AccountID = g.Key.Value,
                       Total = g.Sum(d =&gt; (decimal) d.Value)
                   }) as DataServiceQuery&lt;DataSummary&gt;;
  
  
          query.BeginExecute(new AsyncCallback(r =&gt;
          {
              try
              {
                  this.grid.ItemsSource = query.EndExecute(r).ToList();
              }
              catch (Exception ex)
              {
                  string message = ex.Message;
              }
          }), null);
  </code></pre>
  
  <p>when I run the query, It says that group by it is not supported.
  I have seen many question about WCF data services that use group by. anybody know what is going on??? </p>
  
  <p>When I put the code in the server side, it gives me an error too. I have tried to retrieve information with datasummary without the group by and it works. so I am out of options</p>
  
  <p>Thanks in advance</p>