Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] Illegal use of aggregates or non-group column in target list

From: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
To: Jason <neumeier(at)bright(dot)net>, "pgsql-general(at)hub(dot)org" <pgsql-general(at)hub(dot)org>
Subject: Re: [GENERAL] Illegal use of aggregates or non-group column in target list
Date: 2000-03-03 18:53:41
Message-ID: 38C00A35.355FE9@nsi.edu (view raw or flat)
Thread:
Lists: pgsql-general
Jason wrote:

> select target, avg(reaction_time) from data_table GROUP BY target;
>
> That should do it.
>
> -Jason.
>

Wow! That works great. Thanks Jason.

It's interesting that "select target, avg(reaction_time) from data_table
GROUP BY target;" works but not "select target, avg(reaction_time) from
data_table;".

Doesn't the parser automatically group by the first variable returned?

-Tony



Responses

pgsql-general by date

Next:From: Abdelkrim WAHHABIDate: 2000-03-03 19:03:06
Subject: system crash
Previous:From: G. Anthony ReinaDate: 2000-03-03 18:14:58
Subject: Illegal use of aggregates or non-group column in target list

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group