Sometimes I'd like to produce a subset of a fetched collection and apply various aggregates without having to re-visit the database:
Dim customers As New CustomerCollection
customers.GetMulti(selectFilter)
Result
CustomerName, CustomerType
"customer 1", "customer type a", ...
"customer 2", "customer type b", ...
"customer 3", "customer type b", ...
"customer 4", "customer type a", ...
"customer 5", "customer type a", ...
"customer 6", "customer type a", ...
from the customers collection I'd like to project to a datatable applying a count and a groupby ending up wth the structure:
CustomerType, CountOfCustomers
"customer type a", "4"
"customer type b", "2"
is this possible?