Your query does not make sense because it is showing a group of subject, semester missing studen info all togather.
i think the same could be acheived in a much simpler way.
Food for thought:
SELECT TOP (100) PERCENT dbo.Student.Regno, dbo.subjects.Dsubject AS 'Dsubject1', dbo.RESULT.SEMESTER AS 'SEMESTER', Sum(dbo.RESULT.TOTAL) AS 'TOTAL', Sum(dbo.RESULT.TotalCreditMark) AS 'TotalCreditMark', Sum(dbo.RESULT.MAKEUP1) AS 'MAKEUP1', Sum(dbo.RESULT.MAKEUP2) AS 'MAKEUP2', Sum(dbo.RESULT.MAKEUP3) AS 'MAKEUP3'
FROM dbo.Student
INNER JOIN dbo.RESULT ON dbo.Student.Regno = dbo.RESULT.REGNO
INNER JOIN dbo.subjects ON dbo.RESULT.SUBJECTID = dbo.subjects.ID
INNER JOIN dbo.Sessions ON dbo.Student.Session = dbo.Sessions.ID
group by dbo.Student.Regno, dbo.subjects.Dsubject, dbo.RESULT.SEMESTER
Having dbo.RESULT.SEMESTER in ('1st','2nd')