Database schema:

CREATE TABLE "advisedBy" (
	p_id INTEGER -- example: ['9', '6'],
	p_id_dummy INTEGER -- example: ['5', '7'],
	PRIMARY KEY (p_id, p_id_dummy), 
	CONSTRAINT fk_advisedby_person FOREIGN KEY(p_id, p_id_dummy) REFERENCES person (p_id, p_id)
)


CREATE TABLE "taughtBy" (
	course_id INTEGER -- example: ['0', '1'],
	p_id INTEGER -- example: ['180', '40'],
	PRIMARY KEY (course_id, p_id), 
	CONSTRAINT fk_taughtby_person FOREIGN KEY(p_id) REFERENCES person (p_id),
	CONSTRAINT fk_taughtby_course FOREIGN KEY(course_id) REFERENCES course (course_id)
)


CREATE TABLE course (
	course_id INTEGER -- example: ['0', '1'],
	"courseLevel" TEXT -- example: ['Level_300', 'Level_500'],
	PRIMARY KEY (course_id)
)


CREATE TABLE person (
	p_id INTEGER -- example: ['4', '3'],
	professor INTEGER -- example: ['0', '1'],
	student INTEGER -- example: ['0', '1'],
	"hasPosition" TEXT -- example: ['0', 'Faculty'],
	"inPhase" TEXT -- example: ['0', 'Post_Quals'],
	"yearsInProgram" TEXT -- example: ['0', 'Year_2'],
	PRIMARY KEY (p_id)
)

Question: What are the courses taught by the advisors who gave advice to student with ID 376?
Evidence: courses refers to course_id; advisors refers to p_id_dummy and taughtBy.p_id; student with ID 376 refers to advisedBy.p_id = 376

SQL:
SELECT T3.course_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN taughtBy AS T3 ON T2.p_id = T3.p_id WHERE T1.p_id = 141