count different values in column?

From: "Thorsten Wenzlaff" <thorsten(dot)wenzlaff(at)gmx(dot)de>
To: "pgsql" <pgsql-sql(at)postgresql(dot)org>
Subject: count different values in column?
Date: 2002-04-19 09:27:59
Message-ID: 006501c1e784$7f685d90$a57ba8c0@wxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,
today I have a new question :)

I've a resulttable is generated by a couple of subselects and joins which
contains only one column.

Now I want to count the different values in the column.

Resulttable :
a
------
10
12
12
12
14
14
15

I need the value which is repeated most in the resulttable (in this example
12 ) !

Any suggestions ?

Thx
berger

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Albrecht Berger 2002-04-19 09:30:47 count different values in column
Previous Message Roberto Mello 2002-04-19 01:41:51 Re: [DOCS] [GENERAL] Migrating Oracle to PostgreSQL