beopace5
Joined: 08/06/2021 23:39:46
Messages: 1
Offline
|
I want help with this code. I am attempting to list city and county for all cities having population over 0 in the state of New York This code doesn't work. All my tables are named lowercase different than the norm for easy reading. I don't know why the code doesn't work. I get stuck on the CONCAT. Can you correct it.
SELECT DISTINCT geoname.name AS placename, admin2codes.name AS county FROM geoname INNER JOIN admin2codes ON CONCAT(geoname.country,'.',geoname.admin1,'.',geoname.admin2) = admin2codes.code WHERE geoname.admin = 'NY' AND geoname.population > 0 LIMIT 500
|