Re: SQL question: GROUP BY and MAX

From: Matti Teppo <matti.teppo_at_nospam.deio.net>
Date: Wed, 23 May 2001 12:52:38 +0200
Message-ID: <3B0B9676.144BC2F7_at_nospam.deio.net>


Yes, this works! Even with the enhanced sample data where id values are not in ascending order.

Thanks,

Matti

Jan Hidders wrote:

> SELECT *
> FROM revisions r1
> WHERE r1.rev IN ( SELECT MAX(r2.rev)
> FROM revisions r2
> WHERE r1.firstid = r2.firstid );
>
> But I didn't test this.
Received on Wed May 23 2001 - 12:52:38 CEST

Original text of this message