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 B618A9DCAE5 for ; Sat, 10 Dec 2005 21:12:39 -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 77725-08 for ; Sat, 10 Dec 2005 21:12:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by postgresql.org (Postfix) with ESMTP id B31219DCAB8 for ; Sat, 10 Dec 2005 21:12:37 -0400 (AST) Received: by wproxy.gmail.com with SMTP id i21so1023982wra for ; Sat, 10 Dec 2005 17:12:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WKLd0L3ELzswKa2UPklzceAIRx0XppuPWL7YGS3yFjixK2I0nKs4JicD7Hu3rpHSPabmk4txgpAC/Xn/MxWb2yvmZTW1uaTVDYxWtAV8n4mKmHPSR0ugqIuED+OsnhtEmKiUvA0xMhYfSX7LDUCcjKy6i1rq1GRwy02lz38aMbg= Received: by 10.54.153.18 with SMTP id a18mr4991383wre; Sat, 10 Dec 2005 17:12:40 -0800 (PST) Received: by 10.54.98.6 with HTTP; Sat, 10 Dec 2005 17:12:41 -0800 (PST) Message-ID: Date: Sat, 10 Dec 2005 20:12:41 -0500 From: Jaime Casanova To: "Foster, Stephen" Subject: Re: select count of distinct rows Cc: =?ISO-8859-1?Q?Havasv=F6lgyi_Ott=F3?= , pgsql-sql@postgresql.org In-Reply-To: <005c01c5fdf0$01b90c10$2101a8c0@cfgod> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <005501c5fdef$30be34f0$0200a8c0@OTTO> <005c01c5fdf0$01b90c10$2101a8c0@cfgod> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.136 required=5 tests=[AWL=0.136] X-Spam-Score: 0.136 X-Spam-Level: X-Archive-Number: 200512/79 X-Sequence-Number: 23621 On 12/10/05, Foster, Stephen wrote: > Well this should work but I tried it and it didn't. > > SELECT DISTINCT COUNT(*) FROM mytable; > No, it shouldn't work... actually is a non-sense, count will return just one value so there is nothing to be distinct with... -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)