Closed FrodeMMeling closed 1 year ago
I was able to hack this in by doing this:
->aggregate('HOUR, login_time, logout_time)', 'SUM(TIMESTAMPDIFF');
If aggregate function could take more parameters this would work without the ')' hack.
A timestamp function may not be added since that is not supported in all databases.
Maybe adding $column parameter as string|array. then if array, you do a implode(",", $columns) to then I think all existing code will not be broken.
->aggregate(['HOUR', 'login_time', 'logout_time']....
Seems like you've found a workaround.
Is it possible to aggregate on a duration in minutes between two timestamps. Like using MYSQL TIMESTAMPDIFF