Find the name of instructors who are advisors of students from the Math department, and sort the results by students' total credit.
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' order by t3.tot_cred
Find name of students in the Math department
select name from student where dept_name = 'Math'
Give me IDs of instructors in the Marketing department
select id from instructor where dept_name = 'Marketing'