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: List the advisor IDs for students with eighth year of program and position status in faculty of those professors.
Evidence: advisor IDs refers to p_id_dummy and person.p_id where professor = 1; eighth year of program refers to yearsInprogram = 'Year_8'; position status in faculty of those professors refers to hasPosition

SQL:
SELECT T1.p_id_dummy, T2.hasPosition FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_8'