in reply to (somewhat OT) Seeking a SQL counter-example
A minor issue - it's valid SQL syntax to include columns in the GROUP BY clause which aren't listed in the SELECT clause (although it's not often used, and I don't know if DBIx::Class supports it).
Adding auto-groupby would break this unless the user is allowed to override the auto-grouping.
It might also become a maintenance trap for the unwary; the existing DBIx::Class syntax is clearly recognisable as a GROUP BY query to somebody familiar with SQL. An auto-grouped version might not - it depends on the implementation
Otherwise, I don't think column order in GROUP BY makes a difference
|
|---|