Oh, that's it. Thank you all very much. Otto
----- Original Message ----- From: "Frank Bax" <[EMAIL PROTECTED]>
To: <pgsql-sql@postgresql.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? http://archives.postgresql.org ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster