I have tables for a forum system. I am tring to get the following data to show on the forum page
Subject, Descripton, Last Posting Date (either post or comment), and username who made last post(either post or comment)
here are my tables
ForumSubject[
Id,
Subject,
Description
]
ForumPost[
id,
Subject,
Title
Body,
UserId,
Date
]
ForumComment[
id,
PostId,
UserId,
Date,
Comment
]
User[
id
Name
]
Here is what i have so far
SELECT
subject.Id,
subject.Description,
subject.Subject
FROM dbo.ForumSubject subject
How now can I get the MAX Date of either a post or comment which ever is last, and the user name for the post???
Thank you!
You can do that :