Easy to Create, Easy to Change - Easy to use!


in groups





in groups


Grouping Operator


The in groups operator groups records and generates statistical totals for each group if any other statistic is requested by the query.

Note: the variation ?in groups with group-totals? is included for compatibility with previous version of DataEase. Either version will include statistics if they are required


FIELDNAME in groups [with group-totals] ;


The in groups operator can be used only on list items following the list records command. It cannot be used with the enter a record, modify records, or delete records commands.

In the procedure output, the group identifier appears only once at the beginning of a group. If statistics are specified for any output fields, group subtotals for those fields are included in the output.

An item to be processed in groups with group-totals should be listed before all other output items in a script, including items to be sorted in order. When a field is listed in groups with group-totals, DataEase also sorts the groups in order (e.g., when grouping MEMBERS by STATE, all California members are listed before any Colorado members).



Grouping operators cannot be used with the all relational operator (i.e., if RESERVATIONS is the Primary table, you cannot use the query statement: all MEMBERS STATE in groups.



list records

STATE in groups ;

LASTNAME in order ;

TOTALDUE : item sum .



This script tells DataEase: (1) Process all MEMBERS records with the same value in the STATE field as a group, (2)display the group identifier (STATE) once at the beginning of each group, (3) within each group, arrange the members alphabetically by LAST NAME, and (4) list each member's TOTAL DUE, the subtotal for each STATE group, and the sum of all the TOTAL DUE amounts combined. The output from this query might look as follows:




Last Name

Total Due

















Group Total:












Group Total:






Grand Total:



See Also

On the forum about in groups

ExecDQL and in groups

Hi folks,in the last days I have been testing the use of MemoExecDQL / ExecDQL functions. It seems very powerful and I would like to use it instead the "null printer hack" to speed up and streamline my application. But during my tests I noticed...

Product: Dataease [{8}]FIVE. Written by George Washington 30/05/14 at 14:55:58

Re:ExecDQL and in groups

Is anybody in there?...

Product: Dataease [{8}]FIVE. Written by George Washington 11/06/14 at 06:31:28

Re:ExecDQL and in groups

Sorry for the late reply. We are currently working full out on 8.2 where DQL will be further enhanced.ExecDQL is DQL from "future" DataEase and is not derived from the existing DQL in DFW. Somewhere along the line someone "misunderstood" DQL a...

Product: Dataease [{8}]FIVE. Written by Mr. DataEase 11/06/14 at 11:02:44

On the blog about in groups