Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.36 KB | None | 0 0
  1. SELECT p1.*
  2. FROM wp_posts p1
  3. INNER JOIN
  4. (
  5.     SELECT max(post_date) MaxPostDate, post_author
  6.     FROM wp_posts
  7.     WHERE post_status='publish'
  8.        AND post_type='post'
  9.     GROUP BY post_author
  10. ) p2
  11.   ON p1.post_author = p2.post_author
  12.   AND p1.post_date = p2.MaxPostDate
  13. WHERE p1.post_status='publish'
  14.   AND p1.post_type='post'
  15. order by p1.post_date desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement