The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
How much different forums are your visitors posting in?
This query displays the userid and the number of different forums your users are writing posts in:
Code:
SELECT userid, count( tmp_a.differentforums ) AS differentforums FROM ( SELECT post.userid, count( thread.forumid ) AS differentforums FROM post, thread WHERE post.threadid = thread.threadid GROUP BY post.userid, thread.forumid ) AS tmp_a GROUP BY userid
I also like to have the number of all posts for a forum-level like this, but more elegant: Code:
SELECT sum( user.posts ) FROM ( SELECT userid, count( tmp_a.differentforums ) AS differentforums FROM ( SELECT post.userid, count( thread.forumid ) AS differentforums FROM post, thread WHERE post.threadid = thread.threadid GROUP BY post.userid, thread.forumid ) AS tmp_a This query displays the number of posts users wrote that were engaging in 10 different forums: Code:
SELECT sum( user.posts ) FROM ( SELECT userid, count( tmp_a.differentforums ) AS differentforums FROM ( SELECT post.userid, count( thread.forumid ) AS differentforums FROM post, thread WHERE post.threadid = thread.threadid GROUP BY post.userid, thread.forumid ) AS tmp_a GROUP BY userid HAVING differentforums =10 ) AS tmp_b, user WHERE user.userid = tmp_b.userid |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|