in reply to Re: MAX and GROUP BY in DBIx::Class
in thread MAX and GROUP BY in DBIx::Class
Not sure I got your needs right, as I don't work with DBIx::Class, but is there any reason you can't use a CTE (common table expression) in your query?
Something like (for Postgresql) :
with t1 as (SELECT MAX(event_id) as max_event_id, name FROM events GRO +UP BY name) SELECT * FROM events INNER JOIN t1 ON t1.max_event_id = events.event.i +d;
that would give you the list of objects directly
compta.libremen.com : Logiciel libre de comptabilité générale et analytique en partie double
|
|---|