Re: Counting Distinct Records

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Counting Distinct Records
Дата
Msg-id 20041116115807.E79990@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Counting Distinct Records  (Thomas F.O'Connell <tfo@sitening.com>)
Ответы Re: Counting Distinct Records
Список pgsql-sql
On Tue, 16 Nov 2004, Thomas F.O'Connell wrote:

> I am wondering whether the following two forms of SELECT statements are
> logically equivalent:
>
> SELECT COUNT( DISTINCT table.column ) ...
>
> and
>
> SELECT DISTINCT COUNT( * ) ...

Not in general.

The former counts how many distinct table.column values there are.  The
distinct in the latter would be basically meaningless unless there's a
group by involved.



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

Предыдущее
От: Thomas F.O'Connell
Дата:
Сообщение: Counting Distinct Records
Следующее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: Counting Distinct Records