Mysql Query with possible join required ?
I have a query:
SELECT DISTINCT suburb FROM location WHERE city='Auckland' ORDER BY suburb ASC
This basically pulls data from the Suburb column when the City Column has Brisbane next to it.
Now what I'd like to do Is have another table with location data (like city and suburb above) in it as well as actual product data and it's called services.
Now I'd like to be able to run the above query but only return the suburbs that have matching suburbs in the services table, hence removing suburbs I don't actually have data for.
Country, Language ID, ISO2, Suburb, Town/City, Region, Postcode, Road Name, Latitude, Longitude, TZ, UTC, DST,
NZ, EN, NZ-AUK, East Tamaki, Auckland, Auckland, 2016, Aaronville Way, -36.9391594, 174.909317, Pacific/Auckland, UTC+12, Y,
NZ, EN, NZ-AUK, Mt Roskill, Auckland, Auckland, 1034, Bogan Way, -34.871287, 172.766999, Pacific/Auckland, UTC+12, Y,
sid, Bussines Name, Address, Website, Email, Phone, Service, Category, Sub category, Sub category type, Sub category type Description, Price, Region, City, Suburb, Postcode,
1 Balls'R'Us, Level 1 Unit 1 10 Example Drive, http://www.example.com/, firstname.lastname@example.org, (09) 555 1234, Ball, Small, Bouncy, Large, 0, Auckland, Auckland, East Tamaki, 2016,
So when I execute my Select statement I would only expect to see the one suburb "east tamaki" and not "mt roskill" as the output.
Hope that makes sense..