Does this work for you?SELECT GD.groupID, GD.groupName, GD.createdBy, UD.nameOnline, SUM(UD1.TotalPoints) FROM tblGroupDetails GD INNER JOIN tblUserDetails UD ON GD.createdBy = UD.userID INNER JOIN tblGroupUsers GU ON GD.GroupID = GU.GroupID INNER JOIN tblUserDetails UD1 ON GU.UserID = UD1.UserID WHERE GD.groupID = @groupID GROUP BY GD.groupID, GD.groupName, GD.createdBy, UD.nameOnline
EDIT: You might want to consider throwing in an OUTER JOIN from tblGroupDetails in case the group has no users at all. With an INNER JOIN you will get no results in that case.OS