COUNT() with ORDER BY

Поиск
Список
Период
Сортировка
От Andrus
Тема COUNT() with ORDER BY
Дата
Msg-id fmgbn2$ot6$1@news.hub.org
обсуждение исходный текст
Ответы Re: COUNT() with ORDER BY  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
create temp table test (col char);
select count(col) from test order by col;

causes

ERROR:  column "test.col" must appear in the GROUP BY clause or be used in
an aggregate function
SQL state: 42803


How to fix this ?
This statement is generated by DbLinq driver and it is difficult to re-qrite
the driver.

Query looks quite resonable to me and should be accepted by PostgreSQL 8.3
Beta.


Andrus.



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

Предыдущее
От: Janning Vygen
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: "danilo.juvinao"
Дата:
Сообщение: Re: know the schema name in a trigger