What is the proper way to say this ?

SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId = N.PrimaryCityId
WHERE  N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance < 20

I am trying to enter in a city and get all the nearby cites with 20 miles
Somehow, I need to join NearbyCities.PrimaryCityId, Cities.CityId, and Cities.city


learning :)


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to