How many professors are there in total?
select count ( * ) from professor
What are the names of the departments they teach classes for?
select distinct t4.dept_name from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code
How many of the 22 professors are part of the Accounting department?
select count ( * ) from professor where dept_code = "ACCT"
How many of those 3 are currently teaching courses?
select count ( distinct t3.emp_num ) from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t3.dept_code = 'ACCT'
Could you tell me the number of them that are teaching in a physical class room instead of through online classes?
select count ( distinct t3.emp_num ) from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t3.dept_code = 'ACCT'
What are their first names and the class rooms where they teach?
select t2.emp_fname, t1.class_room from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t4.dept_name = 'Accounting'