GROUP BY option in controller.search() and controller.sort()

It would be very helpful to have an option to use a GROUP BY in controller.search() and in controller.sort().
This way we can suppress any double result records when a sort/search is done on related records.

Right now we have to resort to pure SQL.

See http://forum.servoy.com/viewtopic.php?t=5549

Can you clarify with an example?

I think was is meant is a DISTINCT option, not group by. So if this optional parameter is given, Servoy will query … DISTINCT (PK) …

patrick:
I think was is meant is a DISTINCT option, not group by. So if this optional parameter is given, Servoy will query … DISTINCT (PK) …

A distinct with a related sort? Example please?

Looks like Jan has a point ;)
You will end up with double PK’s anyway.

BUT! What if we had a function to do a distinct on the result set so AFTER the search/sort…or am I overlooking something else now?