List:General Discussion« Previous MessageNext Message »
From:Joe Pearl Date:June 21 2008 2:34pm
Subject:Re: Error with max and group by
View as plain text  
Thanks, but this is not the result I want.  The SQL for the correct result
is at
http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group.html and
I'm apparently using the correct SQL.

The problem is that the columns are not coming out correctly - the rows
considered for the max function are apparently being mixed up.

On Sat, Jun 21, 2008 at 12:00 AM, Perrin Harkins <perrin@stripped> wrote:

> On Fri, Jun 20, 2008 at 10:50 PM, Joe Pearl <joe@stripped> wrote:
> > I want to get back only the most recent entry for each person and I don't
> > care about the order.  I want the result to show Jim with the acq_date of
> > "2008-01-03", Mary and Sally with the location and date for all of them.
>
> http://dev.mysql.com/doc/refman/5.0/en/example-maximum-row.html
>
> - Perrin
>



-- 
Arnold Schwarzenegger  - "I have a love interest in every one of my films -
a gun."

Thread
Error with max and group byJoe Pearl21 Jun
  • Re: Error with max and group byPerrin Harkins21 Jun
    • Re: Error with max and group byJoe Pearl21 Jun
      • Re: Error with max and group byPerrin Harkins21 Jun
  • Re: Error with max and group byBrent Baisley21 Jun