Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT p1.*
- FROM wp_posts p1
- INNER JOIN
- (
- SELECT max(post_date) MaxPostDate, post_author
- FROM wp_posts
- WHERE post_status='publish'
- AND post_type='post'
- GROUP BY post_author
- ) p2
- ON p1.post_author = p2.post_author
- AND p1.post_date = p2.MaxPostDate
- WHERE p1.post_status='publish'
- AND p1.post_type='post'
- order by p1.post_date desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement