Re: Finding multiple events of the same kind - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Finding multiple events of the same kind
Date
Msg-id 20060611183639.19893.qmail@web31810.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Finding multiple events of the same kind  ("Leif B. Kristensen" <leif@solumslekt.org>)
Responses Re: Finding multiple events of the same kind
List pgsql-sql
> On Sunday 11. June 2006 15:27, Frank Bax wrote:
> >SELECT participants.person_fk, count(participants.person_fk) FROM
> > events, participants
> >    WHERE events.event_id = participants.event_fk
> >         AND events.tag_fk in (2,62,1035)
> >    GROUP BY participants.person_fk HAVING
> > count(participants.person_fk) > 1
> 
> That worked like a charm! Thank you very much!
> -- 

Also,  you could create a unique column constraint that would prevent multiply instances of the
same person in the participants table.

Regards,

Richard Broersma Jr.


pgsql-sql by date:

Previous
From: "Leif B. Kristensen"
Date:
Subject: Re: Finding multiple events of the same kind
Next
From: Owen Funkhouser
Date:
Subject: remove