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.
aicean
Mailto:aicean(at)netspeed-tech(dot)com
----- Original Message -----
From: "Rod Taylor" <rbt(at)rbt(dot)ca>
To: "aicean" <aicean(at)netspeed-tech(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Sent: Wednesday, October 15, 2003 10:27 AM
Subject: Re: [SQL] How can I produce the following desired result?