fixed errors in nonstudent SQL