select StudentiD from Grades G, course T where Grade='A' and S.courseID=T.courseID and exists (select * from department where departmentid='1');