Re: [SQL] exclusion query

2008-09-25 Thread Louis-David Mitterrand
the id of the event you wanna exclude > join event_type et > ON e.id_event_type = et.id_event_type > where et.type_fr='théâtre' > GROUP BY pt.type_fr > HAVING SUM(e2.id_event) IS NULL; > > - Original Message - From: "Louis-David Mitterrand" > <[EMAI

Re: [SQL] exclusion query

2008-09-25 Thread Oliveiros Cristina
type et ON e.id_event_type = et.id_event_type where et.type_fr='théâtre' GROUP BY pt.type_fr HAVING SUM(e2.id_event) IS NULL; - Original Message - From: "Louis-David Mitterrand" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 23, 2008 9:18 AM Subject: Re: [SQL] exclus

Re: [SQL] exclusion query

2008-09-23 Thread Louis-David Mitterrand
On Mon, Sep 22, 2008 at 09:39:08AM -0700, Mark Roberts wrote: > > Taking your second email into account, I came up with: > > select distinct pt.type_fr > from person_to_event pte > inner join person_type using (id_person_type) > where id_person_type in ( > select id_person_type > from

Re: [SQL] exclusion query

2008-09-22 Thread Mark Roberts
On Mon, 2008-09-22 at 16:34 +0200, Louis-David Mitterrand wrote: > > > To select person_type's used in a certain event_type I have this > query: > > select distinct pt.type > from person_type pt > natural join person_to_event > join event e using (id_event) >

Re: [SQL] exclusion query

2008-09-22 Thread Louis-David Mitterrand
On Mon, Sep 22, 2008 at 04:34:14PM +0200, Louis-David Mitterrand wrote: > Hi, > > I've got five related tables: > > - person_type: > id_person_type integer > type_fr text > > - person: > id_person integer > ... > > - person_to_event: >

[SQL] exclusion query

2008-09-22 Thread Louis-David Mitterrand
Hi, I've got five related tables: - person_type: id_person_type integer type_fr text - person: id_person integer ... - person_to_event: id_person -> person id_person_type -> person_type (e.g: actor, di