pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antti Linno <alligator@all.ee>
To: pgsql-sql@postgresql.org
Subject: GROUP by
Date: Wed, 5 Jul 2000 14:14:55 +0300 (EEST)
Message-ID: <Pine.LNX.4.04.10007051409050.13491-100000@all.ee> (raw)

I have table job, and I want to select data from it, grouping by
workgroups. When I use 
 select id,name from job where workgroup='top leaders' AND ...  group by
workgroup;
When I want to group, I get 
ERROR:  Illegal use of aggregates or non-group column in target list
I'm confused, why does query work only with sum,min etc. alone in
select.

Antti





view thread (5+ messages)  latest in thread

Message-ID: <Pine.LNX.4.04.10007051409050.13491-100000@all.ee>
Permalink:  ../Pine.LNX.4.04.10007051409050.13491-100000@all.ee/
Also on:    postgresql.org/message-id/Pine.LNX.4.04.10007051409050.13491-100000@all.ee

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: alligator@all.ee
  Subject: Re: GROUP by
  In-Reply-To: <Pine.LNX.4.04.10007051409050.13491-100000@all.ee>
  References: <Pine.LNX.4.04.10007051409050.13491-100000@all.ee>

* 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