Re: Strange behavior of group by column1 having column2 = max (column2)

2003-10-16 Thread Ana Holzbach
Sorry, I meant to say "I've tried the subquery", not the substring, on 4.1, and that's probably what we'll use in the future. select date, value, type from A a1 where value = (select max(a2.value) from A a2 where a1.type = a2.type); Ana --- Ana Holzbach <[EMAIL

Re: Strange behavior of group by column1 having column2 = max (column2)

2003-10-16 Thread Ana Holzbach
to pad, parse, etc. However, I tried the substring on 4.1 and it's a reasonable alternative. Fortunately, by the time we need this functionality 4.1 will probably be stable. Ana --- Roger Baklund <[EMAIL PROTECTED]> wrote: > * Ana Holzbach > > Thanks for your reply.

Re: Strange behavior of group by column1 having column2 = max (column2)

2003-10-16 Thread Ana Holzbach
rst date found on the table for each type. Any suggestions ? >* Ana Holzbach >> I've tried this on MySQL 4.0.15 and 4.1.0-alpha, with >> the same result. >> >> I have the following table A: >> >> ++---+--+ >> | id | value | type | >

Strange behavior of group by column1 having column2 = max (column2)

2003-10-15 Thread Ana Holzbach
for type a, the maximum value comes first in the table, so it's returned in the search for max query. Again for case a, the minimum value comes second in the table, so it's not found in the search for min query This seems odd. Can anyone tell me what I'm missing ? Thanks, Ana