On Tue, Sep 22, 2009 at 11:56:54AM +0200, Pavel Stehule wrote: > > there are more ways - depends on what you wont. > > one way is > > SELECT * > FROM price > WHERE (id_product, date) = (SELECT id_product, max(date) > FROM price > GROUP BY > id_product)
Nice. I didn't know one could have several args in a single WHERE clause. Thanks, -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql