Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total Threads and Posts in a Forum

Status
Not open for further replies.

year2000

Programmer
Jun 10, 2002
18
IN
Please help me writing the sql query, to return total numbers of THREADS and POSTs for each forum. I have 3 tables-
1) FORUM [ForumID,Title,Description]
2) THREADS [ThreadID,ForumID,Title,Description]
3) POSTS [PostID,ThreadID,Description,postedOn]

So you can easily identify the relationship in these tables.
I want result as below:
--------------
FORUM Title No of Threads No of POSTS Last Post
<F1> 10 50 <date>
<F2> 100 5 <date>
-----------------

Please suggest the SQL query.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top