Isn't that obvious?
PHP Code:
$topposter = $db->query_first("
SELECT user.userid, user.username, COUNT(post.postid) AS postcount
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE thread.forumid=$forumid AND thread.firstpostid != post.postid
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT 1
");