[Dbix-class] Using 'DISTINCT ON' clause in select statement

Mark Blythe list at markblythe.com
Fri Aug 18 22:30:16 CEST 2006


On 8/18/06, Paul Henrich <phenrich at butler.edu> wrote:

> It seems postgres has a strange syntax/behavior for GROUP BY that becomes
> difficult to work with when using SQL::Abstract and when working with joined
> tables. Basically, any column you select must be used in the GROUP BY or in
> an aggregate function.

If I'm not mistaken, that is ANSI SQL syntax.  MySQL allows you to
select other columns without using them in the GROUP BY, but that's an
extension of the standard.



More information about the Dbix-class mailing list