[resolved] Get Last x Unique Author IDs (2 posts)

  1. nandanjha
    Posted 6 years ago #

    I run a multi-author blog. Requesting Help.

    I want to show Gravatar + 'no of posts' of recent x unique authors. It might happen that recent x posts are by same authors. So we do not need authors of last x posts. What I am looking for is that

    - to show x recent unique authors and they could be from last y posts or z posts.

    Big thanks in advance.

  2. nandanjha
    Posted 6 years ago #

    Following seems to be working. thanks.

    select post_author, max(post_date) as postdate from wp_posts where post_type = 'post' and post_status='publish' group by post_author order by postdate desc limit 5

Topic Closed

This topic has been closed to new replies.

About this Topic