Skip to main content

SelectQueryFluentBuilder.GroupFilter(String) Method

Specifies the filter criteria to add to the current query containing grouped/aggregated columns.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public SelectQueryFluentBuilder GroupFilter(
    string groupFilterString


Name Type Description
groupFilterString String

A String value, specifying the filter criteria.


Type Description

A SelectQueryFluentBuilder object.


In the following example, a query uses an inner join to select columns from separate data tables sharing a common column key.

using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Sql;
using DevExpress.Xpo.DB;
// ...

private SqlDataSource BindToData() {
    // Create a data source with the required connection parameters. 
    Access97ConnectionParameters connectionParameters =
    new Access97ConnectionParameters("../../Data/nwind.mdb", "", "");
    SqlDataSource ds = new SqlDataSource(connectionParameters);

    // Join the Categories and Products table by the CategoryID column. 
    // Return the list of categories and the number of products in each category. 
    // Sort the categories by the number of products in them. 
    // The included categories must contain a specific number of products.
    SelectQuery query = SelectQueryFluentBuilder
        .Join("Products", "CategoryID")
        .SelectColumn("ProductName", AggregationType.Count, "ProductCount")
        .SortBy("ProductName", AggregationType.Count, System.ComponentModel.ListSortDirection.Descending)
        .GroupFilter("[ProductCount] > 7")

    // Add the query to the collection and return the data source. 
    return ds;
See Also