Element Details: Sql+Group
 Back


Available in: Logi Info Source code name: SqlGroup

ActiveSQL SqlGroup groups rows from a DataLayer, and allows aggregate values to be created. For example, suppose you have an Orders Table and you would like to list only the individual sales person associated with the orders. You would select something like EmployeeID as the grouping column. If you want to get a count of all orders for each employee, you would add a Group Aggregate Column with the function "COUNT". Alternatively, a "SUM" aggregate could provide the total sales for each employee.

Rows are grouped by values based on one or more columns of the DataLayer. Enter the grouping column name(s) in the GroupColumn attribute. Separate multiple column names with commas.

The Group can either keep just the first row from each group, or it can keep all groups. See the KeepGroupedRows attribute.

Element Group:Organize Data



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
GroupColumn
UserDefined
(Required) Set Group Column to the name of the column that will group all rows with the same value together. You can group by multiple columns by adding the additional column names, separated by commas.
ID
UserDefined
The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.
KeepGroupedRows
True
False
KeepGroupedRows indicates that the GroupFilter should not discard the "extra" rows that are grouped together. By default, KeepGroupedRows="False", and only the first row of each group is kept in the DataLayer. When KeepGroupedRows="True", all rows are kept. Any columns created with GroupAggregateColumn elements are added/duplicated in all the grouped rows.



PARENT ELEMENTS

Click element to drill down for more information.

DataLayer.ActiveSQL Sql Group Sql Query


CHILD ELEMENTS

Click element to drill down for more information.

Sql Aggregate Column Sql Group


 Back to top