X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 90B00D1B537 for ; Wed, 15 Oct 2003 03:04:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 50235-01 for ; Wed, 15 Oct 2003 00:03:56 -0300 (ADT) Received: from netspeed-tech.com (unknown [218.104.80.12]) by svr1.postgresql.org (Postfix) with SMTP id C4ADFD1B540 for ; Wed, 15 Oct 2003 00:03:54 -0300 (ADT) Received: (qmail 25354 invoked from network); 15 Oct 2003 02:57:13 -0000 Received: from unknown (HELO aicean) (192.168.0.158) by 0 with SMTP; 15 Oct 2003 02:57:13 -0000 Message-ID: <017c01c392c8$baf24560$9e00a8c0@aicean> From: "aicean" To: "Rod Taylor" Cc: References: <003401c392c1$86c75660$9e00a8c0@aicean> <1066184866.99719.9.camel@jester> Subject: Re: How can I produce the following desired result? Date: Wed, 15 Oct 2003 11:02:12 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/169 X-Sequence-Number: 15569 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@netspeed-tech.com ----- Original Message ----- From: "Rod Taylor" To: "aicean" Cc: Sent: Wednesday, October 15, 2003 10:27 AM Subject: Re: [SQL] How can I produce the following desired result?