Thanks very much. It seems can solve my problem.For select the max "storehistoryid",I have
to compare each row's storehistoryid.
Any other advice?Thanks again.
aiceanMailto:aicean@netspeed-tech.com
----- Original Message -----
From: "Rod Taylor" <rbt@rbt.ca>
To: "aicean" <aicean@netspeed-tech.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Wednesday, October 15, 2003 10:27 AM
Subject: Re: [SQL] How can I produce the following desired result?