Я бы предположил, что структура таблицы будет такой, и я упомянул запрос для этой структуры.
CREATE TABLE student(Id integer PRIMARY KEY, Name text);
INSERT INTO student VALUES(1,'Tom');
INSERT INTO student VALUES(2,'Lucy');
INSERT INTO student VALUES(3,'Frank');
INSERT INTO student VALUES(4,'Jane');
INSERT INTO student VALUES(5,'Robert');
CREATE TABLE Qualifications(Id integer PRIMARY KEY, qualification_text text, qualification_level integer);
INSERT INTO Qualifications VALUES(1,'SSC',1);
INSERT INTO Qualifications VALUES(2,'HSC',2);
INSERT INTO Qualifications VALUES(3,'Grad',3);
CREATE TABLE StudentQualifications(student_id integer, qualification_id integer, marks float);
INSERT INTO StudentQualifications VALUES(1,1,80);
INSERT INTO StudentQualifications VALUES(1,2,90);
INSERT INTO StudentQualifications VALUES(1,3,90);
INSERT INTO StudentQualifications VALUES(2,1,75);
INSERT INTO StudentQualifications VALUES(3,1,70);
SELECT result.Name, highest.qualification_text, highest_marks.marks,lowest.qualification_text,lowest_marks.marks FROM
(SELECT Std.name AS Name,Std.Id AS stud_id, MAX(q.qualification_level) AS
highest,MIN(q.qualification_level) AS lowest
FROM
student std
LEFT JOIN
StudentQualifications sq
ON
std.id = sq.student_id
INNER JOIN
Qualifications q
ON
sq.qualification_id = q.Id
GROUP BY std.Name, std.Id) result
INNER JOIN
Qualifications highest
ON
highest.qualification_level = result.highest
INNER JOIN
Qualifications lowest
ON
lowest.qualification_level = result.lowest
INNER JOIN
StudentQualifications highest_marks
ON
highest.id = highest_marks.qualification_id
AND
result.stud_id = highest_marks.student_id
INNER JOIN
StudentQualifications lowest_marks
ON
lowest.id = lowest_marks.qualification_id
AND
result.stud_id = lowest_marks.student_id;
Возможно, вам потребуется изменить ВНУТРЕННИЕ СОЕДИНЕНИЯ на ВЛЕВО СОЕДИНЕНИЯ, основываясь на предпочитаемых вами данных и результатах.