Write SQL query to solve given problem: For the professor who advised student no.6, please list the IDs of the courses he or she teaches.. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT T2.course_id FROM taughtBy AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id INNER JOIN advisedBy AS T3 ON T3.p_id = T1.p_id WHERE T1.p_id = 9