X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C05EF9DCB9D for ; Fri, 2 Dec 2005 13:44:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47698-06 for ; Fri, 2 Dec 2005 13:44:32 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ermsgsvr.werh.noaa.gov (ermsgsvr.werh.noaa.gov [198.206.32.50]) by postgresql.org (Postfix) with ESMTP id 03D6E9DCAB2 for ; Fri, 2 Dec 2005 13:44:32 -0400 (AST) Received: from [198.206.42.50] (hopper.wiln.noaa.gov [198.206.42.50]) by ermsgsvr.werh.noaa.gov (iPlanet Messaging Server 5.2 HotFix 2.01 (built Aug 26 2004)) with ESMTPSA id <0IQV009AWTA4PI@ermsgsvr.werh.noaa.gov> for pgsql-sql@postgresql.org; Fri, 02 Dec 2005 12:44:32 -0500 (EST) Date: Fri, 02 Dec 2005 12:44:27 -0500 From: Mark Fenbers Subject: Re: Just 1 in a series... In-reply-to: <3720.1133544030@sss.pgh.pa.us> To: Tom Lane Cc: PostgreSQL - SQL Message-id: <439087FB.8000003@noaa.gov> Organization: DOC/NOAA/NWS/OHRFC MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) References: <43908131.9060403@noaa.gov> <3720.1133544030@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.291 required=5 tests=[AWL=0.291] X-Spam-Score: 0.291 X-Spam-Level: X-Archive-Number: 200512/8 X-Sequence-Number: 23550 > > >You might find the "DISTINCT ON" syntax does just what you want --- see >the "weather report" example on the SELECT reference page. It's not >standard SQL though. > This works! Thanks! What would have to be done if I needed a standard SQL solution? Mark