
February 6th, 2012, 12:54 AM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 4
Time spent in forums: 3 h 18 m 42 sec
Reputation Power: 0
|
|
|
MySQL subquery
Hello All,
Thank you in advance for the assist.
I have two tables from two developers, and need to find:
1. The country codes in unique country codes in wp_event_details after 2011-02-08 that are not also before 2011-02-08.
2. From those results I need to know which country codes are also not in wp_r
I have tried to do this myself and I don't think I have enough hair left to finish it. This is my latest attempt at point 1:
SELECT DISTINCT `event_country` FROM `wp_event_details` WHERE `event_start` < '2011-02-08'
AND WHERE NOT IN (SELECT DISTINCT `event_country` FROM `wp_event_details` WHERE `event_start` > '2011-02-08')
for point 2, I have: select rCountry from wp_r
Thank you for the assist, I appreciate any life line.
Simon.
|