A little help with GROUP

I have a table (it is a view, but fully mapped) with about 50 fields.
The first 20 fields are from a customer and the remaining fields from his invoices. (as example)
So I have the customer data in each row.
Now I just want to list the customers and filter them according to criteria in the invoices.
In SQL it looks something like this:

select CustomerField1, CustomerField2, CustomerField3, (.. CustomerField n)
from CustomerInvoiceView
where InvoicesField3 between 2 and 5   /* only an example */
group by CustomerField1, CustomerField2, CustomerField3, (.. CustomerField n)

I have a ready function "JSONFilterToAureliusCriteria< T>" that returns me a "TCriteria< T>".

So far I just call:

JSONFilterToAureliusCriteria<TCustomerInvoiceView>.List;

What do I have to do for the grouping?

Thank you for help
Thomas

Sorry, I have edited the SQL-Statement. Now it's correct

You should use Group projection:

  Find<TCustomerInvoiceView>
    .Select(TProjections.ProjectionList
    .Add(TProjections.Group('CustomerField1'))
    .Add(TProjections.Group('CustomerField2'))
     ...
    )