 [nondet]group_by(+By, 
+Template, :Goal, -Bag)Group bindings of Template that have the same value for By. 
This predicate is almost the same as bagof/3, 
but instead of specifying the existential variables we specify the free 
variables. It is provided for consistency and complete coverage of the 
common database vocabulary.
[nondet]group_by(+By, 
+Template, :Goal, -Bag)Group bindings of Template that have the same value for By. 
This predicate is almost the same as bagof/3, 
but instead of specifying the existential variables we specify the free 
variables. It is provided for consistency and complete coverage of the 
common database vocabulary.