List:General Discussion« Previous MessageNext Message »
From:Ana Holzbach Date:October 16 2003 7:09pm
Subject:Re: Strange behavior of group by column1 having column2 = max (column2)
View as plain text  
 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 <anaholzbach@stripped> wrote:
> 
>  Hi Roger,
> 
>  Thanks for the pointer. 
> 
>  CONCAT would be a nightmare to maintain, especially
> with data where the values can have all sorts of
> ranges, and where we could just as well be looking
> for
> the value corresponding to the latest (or earliest)
> date instead. It would just create too many cases 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


=====
Ana Holzbach
anaholzbach@stripped

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Thread
Strange behavior of group by column1 having column2 = max (column2)Ana Holzbach15 Oct
  • Re: Strange behavior of group by column1 having column2 = max (column2)Roger Baklund15 Oct
Re: Strange behavior of group by column1 having column2 = max (column2)Ana Holzbach16 Oct
  • Re: Strange behavior of group by column1 having column2 = max (column2)Roger Baklund16 Oct
    • Re: Strange behavior of group by column1 having column2 = max (column2)Ana Holzbach16 Oct
Re: Strange behavior of group by column1 having column2 = max (column2)Ana Holzbach16 Oct