Joining mutiple select statements in one SQL statement

Viewed 54

I am trying to join two sql statements into one but have had no success.

I would ideally like the Average query to be added to the end of the columns from the first sql statement.

First statement:

SELECT Modules.UserID, Module_Info.ModuleTitle, Modules.ModuleMarks, Modules.ExamMark, Modules.AssignmentMark, MarkClassification.MarkDescription
FROM Module_Info 
INNER JOIN Modules ON Module_Info.ModuleID = Modules.ModuleID 
INNER JOIN MarkClassification ON Modules.MarkCodeDescription = MarkClassification.MarkId
WHERE(Modules.UserID = '8')

Second statement:

SELECT AVG(Modules.ExamMark) AS Average    
FROM Module_Info     
INNER JOIN Modules ON Module_Info.ModuleID = Modules.ModuleID
WHERE (Modules.ModuleID = '2')
2 Answers
Related