ok. here's what I am trying now. First create a table with the code
below with a list of countries that have the two person names I want.
CREATE TABLE `table_new` SELECT t1.country
FROM `table_old` as t1
JOIN
`table_old` as t2
USING(country)
JOIN
`table_old` as t3
USING(country)
WHERE (t2.`person_name` ='Tom' )
AND (t3.`person_name` ='Kevin' )
GROUP BY (country)

In the next step LEFT JOIN this to the original table USING(country).
I guess this would work.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to