Re: Counting distinct rows

Поиск
Список
Период
Сортировка
От Einar Karttunen
Тема Re: Counting distinct rows
Дата
Msg-id 20020116110307.GB28890@shellak.helsinki.fi
обсуждение исходный текст
Ответ на Counting distinct rows  (John Taylor <postgres@jtresponse.co.uk>)
Ответы Re: Counting distinct rows  (John Taylor <postgres@jtresponse.co.uk>)
Список pgsql-novice
On 16.01.02 10:38 +0000(+0000), John Taylor wrote:
>
> Hi,
>
> I'm having problems counting the number of distinct rows in a table.
>
> I've tried the following:
>
>     select distinct on(id) count(id)  from basketupdates order by id desc;
>

SELECT count(distinct id) FROM basketupdates;
see http://www.postgresql.org/idocs/index.php?sql-expressions.html
for more information.

- Einar Karttunen

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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: select !working
Следующее
От: John Taylor
Дата:
Сообщение: Re: Counting distinct rows