### Database Schema:
CREATE TABLE taughtBy (
	course_id	INTEGER	NULL	PRIMARY KEY,
	p_id	INTEGER	NULL	PRIMARY KEY,
	foreign key (course_id) references course (course_id),
	foreign key (p_id) references person (p_id)
);

CREATE TABLE course (
	course_id	INTEGER	NULL	PRIMARY KEY,
	courseLevel	TEXT	NULL
);

CREATE TABLE person (
	p_id	INTEGER	NULL	PRIMARY KEY,
	professor	INTEGER	NULL,
	student	INTEGER	NULL,
	hasPosition	TEXT	NULL,
	inPhase	TEXT	NULL,
	yearsInProgram	TEXT	NULL
);

CREATE TABLE advisedBy (
	p_id	INTEGER	NULL	PRIMARY KEY,
	p_id_dummy	INTEGER	NULL	PRIMARY KEY,
	foreign key (p_id) references person (p_id),
	foreign key (p_id_dummy) references person (p_id)
);

### User's Query:
List the advisor IDs for students with eighth year of program and position status in faculty of those professors.

### Extra Knowledge:
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
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'