Question: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.
Schema: create table student (id varchar, dept_name varchar, tot_cred varchar, PRIMARY KEY (id)); create table advisor (i_id varchar, s_id varchar, PRIMARY KEY (i_id)); create table instructor (name varchar, id varchar, PRIMARY KEY (name))
SQL: 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