Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select l.name lname, p.name pname, r.place_type rtype, r.name rname
- from locations l
- left join geoplanet_places p on p.woeid = l.woeid
- left join geoplanet_places r on
- (
- (p.ancestry LIKE concat('%', '/', r.woeid, '/', '%'))
- AND r.language = "ENG" AND r.place_type = "State")
- where p.woeid = 2397796;
Add Comment
Please, Sign In to add comment