### Database Schema:
CREATE TABLE prof (
	prof_id	INTEGER	NULL	PRIMARY KEY,
	gender	TEXT	NULL,
	first_name	TEXT	NULL,
	last_name	TEXT	NULL,
	email	TEXT	NULL,
	popularity	INTEGER	NULL,
	teachingability	INTEGER	NULL,
	graduate_from	TEXT	NULL
);

CREATE TABLE RA (
	student_id	INTEGER	NULL	PRIMARY KEY,
	capability	INTEGER	NULL,
	prof_id	INTEGER	NULL	PRIMARY KEY,
	salary	TEXT	NULL,
	foreign key (student_id) references student (student_id),
	foreign key (prof_id) references prof (prof_id)
);

CREATE TABLE student (
	student_id	INTEGER	NULL	PRIMARY KEY,
	f_name	TEXT	NULL,
	l_name	TEXT	NULL,
	phone_number	TEXT	NULL,
	email	TEXT	NULL,
	intelligence	INTEGER	NULL,
	gpa	REAL	NULL,
	type	TEXT	NULL
);

CREATE TABLE registration (
	course_id	INTEGER	NULL	PRIMARY KEY,
	student_id	INTEGER	NULL	PRIMARY KEY,
	grade	TEXT	NULL,
	sat	INTEGER	NULL,
	foreign key (student_id) references student (student_id),
	foreign key (course_id) references course (course_id)
);

CREATE TABLE course (
	course_id	INTEGER	NULL	PRIMARY KEY,
	name	TEXT	NULL,
	credit	INTEGER	NULL,
	diff	INTEGER	NULL
);

### User's Query:
What is the average GPA of the students with the highest research capability and high salary? List the full names of the students.

### Extra Knowledge:
the highest research capability refers to capability = 5; high salary refers to salary = 'high'; prof_id refers to professor’s ID; GPA is an abbreviated name of Grade Point Average where average GPA refers to AVG(gpa);
SELECT AVG(T2.gpa), T2.f_name, T2.l_name FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'high' AND T1.capability = 5 GROUP BY T2.student_id