count different values in column

From: "Albrecht Berger" <berger1517(at)gmx(dot)ch>
To: "pgsql" <pgsql-sql(at)postgresql(dot)org>
Subject: count different values in column
Date: 2002-04-19 09:30:47
Message-ID: 007901c1e784$e3c21010$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 Tod McQuillin 2002-04-19 09:40:35 Re: count different values in column
Previous Message Thorsten Wenzlaff 2002-04-19 09:27:59 count different values in column?