Re: count different values in column?

Поиск
Список
Период
Сортировка
От Rajesh Kumar Mallah
Тема Re: count different values in column?
Дата
Msg-id 3CC1A42B.57D160B@trade-india.com
обсуждение исходный текст
Ответ на count different values in column?  ("Thorsten Wenzlaff" <thorsten.wenzlaff@gmx.de>)
Список pgsql-sql
  <p>Does the below solve your problem ? <br />  <p><tt>SELECT a  from  resulttable group by a order by count(a)  desc
limit1;</tt><br /><tt> a</tt><br /><tt>----</tt><br /><tt> 12</tt><br /><tt>(1 row)</tt><p>regds <br />mallah <br /> 
<br/>  <br />  <p>Thorsten Wenzlaff wrote: <blockquote type="CITE">Hello, <br />today I have a new question :) <p>I've
aresulttable is generated by a couple of subselects and joins which <br />contains only one column. <p>Now I want to
countthe different values in the column. <p>Resulttable : <br />   a <br />------ <br />10 <br />12 <br />12 <br />12
<br/>14 <br />14 <br />15 <p>I need the value which is repeated most in the resulttable (in this example <br />12 ) !
<p>Anysuggestions ? <p>Thx <br />berger <p>---------------------------(end of broadcast)--------------------------- <br
/>TIP2: you can get off all lists at once with the unregister command <br />    (send "unregister YourEmailAddressHere"
tomajordomo@postgresql.org)</blockquote> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Matthew Hagerty
Дата:
Сообщение: Query Praise!
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: OpenFTS/tsearch and Postgresql 7.2.1