solution for opposite of this join / join from this subselect

2003-01-22 Thread Josh L Bernardini
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

Re: opposite of this join

2003-01-21 Thread Josh L Bernardini
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

Re: opposite of this join

2003-01-21 Thread Josh L Bernardini
----------| 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

join from this subselect

2003-01-21 Thread Josh L Bernardini
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

opposite of this join? -- simplified

2003-01-21 Thread Josh L Bernardini
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 [

opposite of this join

2003-01-21 Thread Josh L Bernardini
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

can you EXPLAIN this optimizing UNION

2003-01-15 Thread Josh L Bernardini
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

FYI: superior searchable MySQL list archives at

2003-01-15 Thread Josh L Bernardini
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]>

Re: three table join (RE brent baisley's post) BETTER join syntax?

2003-01-15 Thread Josh L Bernardini
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

RE: three table join (9 table join example inside)

2003-01-15 Thread Josh L Bernardini
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:

three table join

2003-01-14 Thread Josh L Bernardini
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