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 DB8DD9DCC09 for ; Sat, 10 Dec 2005 20:53:40 -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 76249-06 for ; Sat, 10 Dec 2005 20:53:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from viefep12-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by postgresql.org (Postfix) with ESMTP id 1A4B99DCBBD for ; Sat, 10 Dec 2005 20:53:37 -0400 (AST) Received: from OTTO ([213.222.166.137]) by viefep12-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with SMTP id <20051211005339.JESQ25653.viefep12-int.chello.at@OTTO> for ; Sun, 11 Dec 2005 01:53:39 +0100 Message-ID: <003001c5fded$53a2c5a0$0200a8c0@OTTO> From: =?iso-8859-1?Q?Havasv=F6lgyi_Ott=F3?= To: References: <20051209053849.498E8F0BEC@svr2.postgresql.org> Subject: select count of distinct rows Date: Sun, 11 Dec 2005 01:53:40 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002D_01C5FDF5.B54CEEE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[HTML_MESSAGE=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200512/75 X-Sequence-Number: 23617 This is a multi-part message in MIME format. ------=_NextPart_000_002D_01C5FDF5.B54CEEE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I would like to select the count of distinct rows in a table. SELECT COUNT(DISTINCT *) FROM mytable; This does not work. How can I do it with Postgres? Thanks, Otto ------=_NextPart_000_002D_01C5FDF5.B54CEEE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I=20 would like to select the count of distinct rows in a=20 table.
 
SELECT = COUNT(DISTINCT *) FROM=20 mytable;
 
This does not work. = How can I=20 do it with Postgres?
 
Thanks,
Otto
------=_NextPart_000_002D_01C5FDF5.B54CEEE0--