sub query

Поиск
Список
Период
Сортировка
От Martin Kuria
Тема sub query
Дата
Msg-id Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com
обсуждение исходный текст
Список pgsql-sql
Hi I have this problem, when I try to run this query:

SELECT MAX(d), host_position FROM (SELECT host_position, 
COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e;

am getting and ERROR: Attribute e.host_position must be GROUPed or used in 
an aggregate function.

Please to advice what could be the problem and how can I rewrite it to work 
thanks in advance.

Kind regards
+-----------------------------------------------------+
| Martin W. Kuria (Mr.) martin.kuria@unon.org
+----------------------------------------------------+

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail



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

Предыдущее
От: "Martin Kuria"
Дата:
Сообщение: sub query
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: sub query