Guest User

Untitled

a guest
Apr 26th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. select * from activities
  2. join elements where elements.id = activities.element_id
  3. where activities.site_id = 7
  4. and not exists(
  5. select * from activities as newer
  6. where newer.element_id = elements.element_id
  7. and newer.updated_at > elements.updated_at
  8. )
  9. limit 10
Add Comment
Please, Sign In to add comment