Guest User

Untitled

a guest
Jul 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. select l.name lname, p.name pname, r.place_type rtype, r.name rname
  2. from locations l
  3. left join geoplanet_places p on p.woeid = l.woeid
  4. left join geoplanet_places r on
  5. (
  6. (p.ancestry LIKE concat('%', '/', r.woeid, '/', '%'))
  7. AND r.language = "ENG" AND r.place_type = "State")
  8. where p.woeid = 2397796;
Add Comment
Please, Sign In to add comment