What are the names of all of the instructors who are advisors?
select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id
Could you narrow it down to just the names of instructors who are advisors to students from the Math department?
select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math'
What are all of their salaries?
select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math'
What are the names and salaries of the instructors who are advisors to students from the History department?
select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'History'