Instead of joining all tables in group by you can join the given tables by yourself.
Can you try this;
from s in db.ForumStatsSet
join t in db.Topics on t.TopicId == s.TopicId
join f in db.Forums on f.ForumId == t.ForumId
join fg in db.ForumGroups on fg.ForumGroupId == f.ForumGroupId
where s.LogDate >= date1 && s.LogDate <=
group s by new { t.TopicId, t.subject, f.forumName, t.datum, fg.name, f.forumID } into g
orderby g.Count() descending
select new TopicStatsData
{
TopicId = g.Key.topicID,
Count = g.Count(),
Subject = g.Key.subject,
ForumGroupName = g.Key.name,
ForumName = g.Key.forumName,
ForumId = g.Key.forumID
});
ps: There may be some errors, but logically it should be correct!