Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select "media".*
- from "media"
- inner join "media_cities"
- on "media"."id" = "media_cities"."media_id"
- inner join "accounts" on "media"."account_id" = "accounts"."id"
- where "latitude" is not null
- and "longitude" is not null
- and "latitude" > 59.8044
- and "latitude" < 59.9844
- and "longitude" > 30.0852
- and "longitude" < 30.4432
- and "accounts"."network_id" = 1
- and "media_cities"."likes_threshold" > 150
- and "media"."created_at" > '2014-10-27'
- order by "media"."created_at" desc
- limit 20 offset 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement