Peter Brawley wrote:
>> to get the latest value for each id i have queries like:
> 
>> select * from tab A where timestamp = (select max(timestamp) from tab
>> B where B.id=A.id) group by id ;
> 
> See "Within-group aggregates" at
> http://www.artfulsoftware.com/infotree/queries.php.
> 
> PB
> 

hi peter,
txh for your hint,
is seems that the "join .. on" stuff works fine.

the most tricky part was to realize that max(timestamp) as foo was need
so the result could be used with join, (took me 3 sec to find :) )

re,
 wh



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to