This question is locked. New answers and comments are not allowed.
Brendan Enrick
Top achievements
Rank 1
Brendan Enrick
asked on 12 Nov 2009, 02:40 PM
Is it possible to perform a group by to get grouped results with aggregate functions?
3 Answers, 1 is accepted
0
Hello Brendan Enrick,
It is possible perform a group by to get grouped results with aggregate functions. To achieve this goal you should do a query of the following format:
I think that will help you.
Kind regards,
Damyan Bogoev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
It is possible perform a group by to get grouped results with aggregate functions. To achieve this goal you should do a query of the following format:
var customers = from c in scope.Extent<Customer>() group c by c.Country into g select new { Key = g.Key, Count = g.Count() };I think that will help you.
Kind regards,
Damyan Bogoev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Derek
Top achievements
Rank 1
answered on 25 Sep 2014, 07:04 PM
Is there way to do something like this using the OpenAccessLinqDataSource, or can it only be done through code-behind?
0
Hello Derek,
It is possible to achieve the same result with OpenAccessLinqDataSource. An example of the implementation is available in the Data Binding with OpenAccessLinqDataSource sample (the Using Aggregates on Grouped Data section) in our Samples Kit. The exact settings are available in the documentation of the sample, the Using Aggregates on Grouped Data task. You can open the documentation by selecting the sample in the samples grid and clicking on the Open Documentation... button.
I hope this helps. If you need additional information, do not hesitate to get back to us.
Regards,
Doroteya
Telerik
It is possible to achieve the same result with OpenAccessLinqDataSource. An example of the implementation is available in the Data Binding with OpenAccessLinqDataSource sample (the Using Aggregates on Grouped Data section) in our Samples Kit. The exact settings are available in the documentation of the sample, the Using Aggregates on Grouped Data task. You can open the documentation by selecting the sample in the samples grid and clicking on the Open Documentation... button.
I hope this helps. If you need additional information, do not hesitate to get back to us.
Regards,
Doroteya
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.