I can't figure out how to make the following query:
Table = circles_proc
I'd like to find the unique subject, arm, and rep tuples where the rep
has exactly 5 cycles associated with it.
I think it would be something like:
select distinct subject, arm, rep from circles_proc where rep = (select
rep from circles_proc where 5 = count(cycle));
but the count is going to be performed over all tuples returned. I'd
like to have the count performed over each rep and just find the reps
where there are 5 cycles.
Can someone help?
pgsql-novice by date
|Next:||From: Eric Frazier||Date: 2001-03-14 22:21:12|
|Subject: Which is faster, create index after many inserts or before? |
|Previous:||From: Jeff Daugherty||Date: 2001-03-14 18:34:05|
|Subject: Re: relation problem|