AlpineZone
11-26-2011, 01:44 PM
Hey guys,
I'm running a contest in my forum that ends tonight. I need some help assembling a query I am going to use to get into Excel so I can do a random drawing.
Here is what I need (three pieces of information)
List of distinct users that posted in a particular thread
Their join date
Their post count
I have the first part figured out
SELECT DISTINCT USER FROM POST WHERE THREADID = 'xxxxxxx'
I figure I need some sort of join on the USER table (grabbing JOINDATE and POSTS) but I"m not quite that adept with SQL just yet...
thanks in advance!
--------------- Added 1322321429 at 1322321429 ---------------
I think I figured it out :)
SELECT DISTINCT post.username, user.posts, user.joindate
FROM post
INNER JOIN user
ON post.userid=user.userid
WHERE post.threadid='xxxxxxx'
I'm running a contest in my forum that ends tonight. I need some help assembling a query I am going to use to get into Excel so I can do a random drawing.
Here is what I need (three pieces of information)
List of distinct users that posted in a particular thread
Their join date
Their post count
I have the first part figured out
SELECT DISTINCT USER FROM POST WHERE THREADID = 'xxxxxxx'
I figure I need some sort of join on the USER table (grabbing JOINDATE and POSTS) but I"m not quite that adept with SQL just yet...
thanks in advance!
--------------- Added 1322321429 at 1322321429 ---------------
I think I figured it out :)
SELECT DISTINCT post.username, user.posts, user.joindate
FROM post
INNER JOIN user
ON post.userid=user.userid
WHERE post.threadid='xxxxxxx'