X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E5E429FA5C3 for ; Sun, 11 Jun 2006 10:34:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 03921-03 for ; Sun, 11 Jun 2006 10:34:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail42.e.nsc.no (mail42.e.nsc.no [193.213.115.42]) by postgresql.org (Postfix) with ESMTP id 8268C9F9CAA for ; Sun, 11 Jun 2006 10:34:18 -0300 (ADT) Received: from [192.168.0.57] (062016183238.customer.alfanett.no [62.16.183.238]) (authenticated bits=0) by mail42.nsc.no (8.13.6/8.13.5) with ESMTP id k5BDYH2d021828 for ; Sun, 11 Jun 2006 15:34:17 +0200 (CEST) From: "Leif B. Kristensen" To: pgsql-sql@postgresql.org Subject: Re: Finding multiple events of the same kind Date: Sun, 11 Jun 2006 15:34:17 +0200 User-Agent: KMail/1.9.1 References: <5.2.1.1.0.20060611092112.04a773f0@pop6.sympatico.ca> In-Reply-To: <5.2.1.1.0.20060611092112.04a773f0@pop6.sympatico.ca> X-Face: %iea8o"[SI'kMDS.`hz7lU=?\^lC9J-]CVjo; f{4-C:$?uVUEjyN~uYFn%*aH_c3d09U>=?utf-8?q?x=0A=09TXtaoj=7EMV=2E8PgG7hik9=3BcCT2N6+u?=@Y{wH\p3*_f~FH9k,Wi74e[_l%.7b^'zJ)8S'^G<(=?utf-8?q?=3D=0A=09zw8=5CPMC3=27=7BKl9=2EzL*ks!b6wA?=,c~'F`k&Vq|ELDGa|4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/116 X-Sequence-Number: 25352 On Sunday 11. June 2006 15:27, Frank Bax wrote: >SELECT participants.person_fk, count(participants.person_fk) FROM > events, participants >=A0 =A0 WHERE events.event_id =3D participants.event_fk >=A0 =A0 =A0 =A0 =A0AND events.tag_fk in (2,62,1035) >=A0 =A0 GROUP BY participants.person_fk HAVING > count(participants.person_fk) > 1 That worked like a charm! Thank you very much! =2D-=20 Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE