pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Havasvölgyi Ottó <h.otto@freemail.hu>
To: pgsql-sql@postgresql.org
Subject: select count of distinct rows
Date: Sun, 11 Dec 2005 01:53:40 +0100
Message-ID: <003001c5fded$53a2c5a0$0200a8c0@OTTO> (raw)
References: <20051209053849.498E8F0BEC@svr2.postgresql.org>

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

view thread (11+ messages)  latest in thread

Message-ID: <003001c5fded$53a2c5a0$0200a8c0@OTTO>
Permalink:  ../003001c5fded$53a2c5a0$0200a8c0@OTTO/
Also on:    postgresql.org/message-id/003001c5fded$53a2c5a0$0200a8c0@OTTO

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: h.otto@freemail.hu
  Subject: Re: select count of distinct rows
  In-Reply-To: <003001c5fded$53a2c5a0$0200a8c0@OTTO>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox