pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jure Kodzoman (Dhimahi) <jure.kodzoman@dhimahi.com>
To: pgsql-sql@postgresql.org
Subject: GROUP BY issue
Date: Wed, 05 Apr 2006 13:23:38 +0200
Message-ID: <1144236218.5303.5.camel@localhost.localdomain> (raw)

Hy list.

I have 3 tables:

performance
event
pool_performance

each event has it's performances, and can be assigned to one or more
pools.

pool_performance holds performance_id, pool_id and from_date

performance has event_id and performance_id as primary key


what I want to do is 

select min(pool_performance.from_date), pool_id, event_id group by
performance_id

but done in a way that I group only performances belonging to the same
event but for the same pool, and not all performances.

Thanks in advance,

Jure




Message-ID: <1144236218.5303.5.camel@localhost.localdomain>
Permalink:  ../1144236218.5303.5.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1144236218.5303.5.camel@localhost.localdomain

 · 

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: jure.kodzoman@dhimahi.com
  Subject: Re: GROUP BY issue
  In-Reply-To: <1144236218.5303.5.camel@localhost.localdomain>

* 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