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: Find the ID of advisor of student ID 80 and state the level of courses taught by him/her.
Evidence: ID of advisor refers to p_id_dummy; student ID 80 refers to advisedBy.p_id = 80; level of courses refers to courseLevel

SQL:
SELECT T1.p_id_dummy, T2.courseLevel FROM advisedBy AS T1 INNER JOIN course AS T2 ON T1.p_id = T2.course_id INNER JOIN taughtBy AS T3 ON T2.course_id = T3.course_id WHERE T1.p_id = 80