SELECT * FROM courseperterm LEFT JOIN test ON (courseperterm.IDcourseperterm=test.IDcourseperterm) LEFT JOIN course ON (courseperterm.IDcourse=course.IDcourse) LEFT JOIN course_s ON (courseperterm.IDcourseperterm=course_s.IDcourseperterm) LEFT JOIN student ON (course_s.IDstudent=student.IDstudent) WHERE (test.date BETWEEN GETDATE() AND DATEADD(Week,1,test.date)) and course_s.IDstudent='S5028459' order by test.date desc