pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Kuria <martinkuria@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: sub query
Date: Wed, 17 Sep 2003 11:19:15 +0300
Message-ID: <Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com> (raw)

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




view thread (8+ messages)  latest in thread

Message-ID: <Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com>
Permalink:  ../Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com/
Also on:    postgresql.org/message-id/Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: martinkuria@hotmail.com
  Subject: Re: sub query
  In-Reply-To: <Sea2-F62pZdP8lAsKcp0000acdc@hotmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox