From: | Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org>, "Frank Bax" <fbax(at)sympatico(dot)ca> |
Subject: | Re: select count of distinct rows |
Date: | 2005-12-11 01:29:26 |
Message-ID: | 008601c5fdf2$5332d380$0200a8c0@OTTO |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Oh, that's it.
Thank you all very much.
Otto
----- Original Message -----
From: "Frank Bax" <fbax(at)sympatico(dot)ca>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Sunday, December 11, 2005 2:23 AM
Subject: Re: [SQL] select count of distinct rows
At 07:53 PM 12/10/05, Havasvölgyi Ottó wrote:
>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?
select count(*) from (select distinct * from mytable) as x;
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
From | Date | Subject | |
---|---|---|---|
Next Message | Foster, Stephen | 2005-12-11 03:02:39 | Looking for information on PostgreSQL Stored Procedures |
Previous Message | Foster, Stephen | 2005-12-11 01:28:03 | Re: select count of distinct rows |