Task: Text to Code
Input (English): Step 1: For each row in instructor table, find the corresponding rows in advisor table.
Step 2: find i_ID of the results of step 1 whose dept_name equals History
Output (English): SELECT T2.i_ID FROM instructor AS T1 JOIN advisor AS T2 ON T1.ID = T2.i_ID WHERE T1.dept_name = "History"