Advertisement
fbinnzhivko

Untitled

Jun 16th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.30 KB | None | 0 0
  1. select nickname,c.title,latitude,longitude
  2. from locations as l
  3. join users as u
  4. on u.location_id=l.id
  5. join users_chats as uc
  6. on u.id=uc.user_id
  7. join chats as c
  8. on c.id=uc.chat_id
  9. where (latitude between 41.139999 and 44.129999) and (longitude between 22.209999 and 28.359999)
  10. order by c.title asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement