From: | "Martin Kuria" <martinkuria(at)hotmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | sub query |
Date: | 2003-09-17 08:18:27 |
Message-ID: | SEA2-F70XbdYMy68NOH0000aab5@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)kuria(at)unon(dot)org
+----------------------------------------------------+
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Kuria | 2003-09-17 08:19:15 | sub query |
Previous Message | John DeSoi | 2003-09-17 02:39:04 | Re: A simple way to Create type ...? |