thanks to brent, bob and M wells for their contributions to this solution
and to m especially who seems to have put in a lot of time and nailed it.
This query returns a list of people not attending a particular event, given
an events table, a people table, and a many-many epeople table between
the
e: opposite of this join
|
>--|
On Tue, Jan 21, 2003 at 01:38:42PM -0800, Josh L Bernardini wrote:
>
> Bob,
> First of all, thank you. I never would have gotten here on my own. Only I
> am not quite there.
> Using your example, I have managed to list all the events a person i
----------|
On Tue, Jan 21, 2003 at 08:43:29AM -0800, Josh L Bernardini wrote:
>
> I have three tables, people, events and epeople. epeople includes a
person
> id and an event id and works as a list of people attending events in the
> database.
>
> The following
I can't come up with the join syntax to mimic this subselect query to list
people not attending an event (*epeople.eid == event.id):
select people.id as pid, concat(lastname, ", ", firstname) as name from
people where people.id not in
(select epeople.pid from
epeople
left join people on epeo
I would like to get the difference of the results from query 2 and query 1,
or the people not attending event [id 2] (referenced by epeople.eid).
Thought the answer would be query three, but as you see, I get an empty
set. Any advice would be appreciated.
jb
Here is everyone attending the event [
I have three tables, people, events and epeople. epeople includes a person
id and an event id and works as a list of people attending events in the
database.
The following query returns a list of all the people participating in a
particular event
given an event id.
select people.id as pid, conca
I'm trying to determine the more efficient syntax between a left join and
this other thing, maybe its a cross join or just a join. I used explain and
the left join has more NULL Keys but seemingly less rows to look at. Are
the multiplied number of rows pretty much the word on efficiency. They both
http://www.listsearch.com/mysql.lasso
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
same results and both varying between .01, .02 seconds to execute.
6 of one half dozen of another or is there an advantage to one?
My guess is that the second syntax is preferred given the reduced row count
for events in it's explain table.
The first statement uses left joins, the second use's Bre
I want it to return 1 row, but it's returning as many rows as there are
in Table3. Where am I goofing?
TIA,
Tab
mysql
-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 8:30 AM
To: Josh L Bernardini
Cc: [EMAIL PROTECTED]
Subject:
I want a list of all the people in all the meetings in a given event, for
the purpose of printing all their schedules.
I can get a list of meetings in an event given the event id with the
following query:
select meetings.id from meetings where eid=2;
People are assigned meetings in the table
11 matches
Mail list logo