What are the first names of all students taking some classes from the Accounting department?
select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Accounting'
Of those, who also took some classes from the Computer Information Systems department?
select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Accounting' intersect select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Computer info. Systems'