Question: Find the first name and office of the professor who is in the history department and has a Ph.D. degree.
Schema: create table department (dept_code varchar, dept_name varchar, PRIMARY KEY (dept_code)); create table professor (prof_office varchar, emp_num varchar, dept_code varchar, prof_high_degree varchar, PRIMARY KEY (prof_office)); create table employee (emp_fname varchar, emp_num varchar, PRIMARY KEY (emp_fname))
SQL: select t1.emp_fname, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t3.dept_code = t2.dept_code where t3.dept_name = 'history' and t2.prof_high_degree = 'ph.d.'