Each condition in the WHERE clause needs a left piece and a right piece. So you need to change it like below:WHERE (
utSchoolGroup.SchoolGroupDescription = 'Surrey'
AND (utPupil.VRScore = 75 OR utPupil.VRScore = 80)
OR (utPupil.NVRScore < 70 AND utPupil.NVRScore <= 80)
OR (utPupil.MathsScore <= 60 AND utPupil.MathsScore < 70)
)
But, logically that does not seem to make much sense, so may be this is what you need?WHERE (
utSchoolGroup.SchoolGroupDescription = 'Surrey'
AND (utPupil.VRScore = 75 OR utPupil.VRScore = 80)
OR (utPupil.NVRScore > 70 AND utPupil.NVRScore <= 80)
OR (utPupil.MathsScore > 60 AND utPupil.MathsScore < 70)