pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Group BY ...(cont.)
3+ messages / 3 participants
[nested] [flat]

* Group BY ...(cont.)
@ 2000-07-05 12:01  Antti Linno <alligator@all.ee>
  0 siblings, 2 replies; 3+ messages in thread

From: Antti Linno @ 2000-07-05 12:01 UTC (permalink / raw)
  To: pgsql-sql

Ok, if I want to use group by, then I have to put every select field
afterwards to group by. But I do want to group by one field.
Hence
select workgroup,id from job group by workgroup,id;
would create groups of 1?
But I want to group by workgroups.
Sorry if my explanation is fuzzy.
A.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Group BY ...(cont.)
@ 2000-07-05 12:15  tjk@tksoft.com <tjk@tksoft.com>
  parent: Antti Linno <alligator@all.ee>
  1 sibling, 0 replies; 3+ messages in thread

From: tjk@tksoft.com @ 2000-07-05 12:15 UTC (permalink / raw)
  To: alligator@all.ee; +Cc: pgsql-sql

E.g.

select workgroup from job group by workgroup;


will that do?


Troy

> 
> Ok, if I want to use group by, then I have to put every select field
> afterwards to group by. But I do want to group by one field.
> Hence
> select workgroup,id from job group by workgroup,id;
> would create groups of 1?
> But I want to group by workgroups.
> Sorry if my explanation is fuzzy.
> A.
> 
> 
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Group BY ...(cont.)
@ 2000-07-05 12:17  Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
  parent: Antti Linno <alligator@all.ee>
  1 sibling, 0 replies; 3+ messages in thread

From: Jesus Aneiros @ 2000-07-05 12:17 UTC (permalink / raw)
  To: Antti Linno <alligator@all.ee>; +Cc: pgsql-sql

No, you don't you could say:

SELECT workgroup, id
FROM job
GROUP BY workgroups;

On Wed, 5 Jul 2000, Antti Linno wrote:

> Ok, if I want to use group by, then I have to put every select field
> afterwards to group by. But I do want to group by one field.
> Hence
> select workgroup,id from job group by workgroup,id;
> would create groups of 1?
> But I want to group by workgroups.
> Sorry if my explanation is fuzzy.
> A.
> 
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2000-07-05 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-05 12:01 Group BY ...(cont.) Antti Linno <alligator@all.ee>
2000-07-05 12:15 ` tjk@tksoft.com <tjk@tksoft.com>
2000-07-05 12:17 ` Jesus Aneiros <aneiros@jagua.cfg.sld.cu>

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