если есть только 3 предмета, вы можете получить оценки за каждый предмет через подзапрос
SQL
select
s.Studentno, s.Studentname, s.Grade, s.School
,'maths' as subject1, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'maths') as mark1
,'science' as subject2, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'science') as mark2
,'history' as subject3, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'history') as mark3
from Student s
SQL with sample data
with Student as
(
select 1 as Studentno, 'aaaaa' as Studentname, 3 as Grade, 'cambridge' as School from dual union all
select 2 as Studentno, 'bbbbb' as Studentname, 4 as Grade, 'edison' as School from dual union all
select 3 as Studentno, 'ccccc' as Studentname, 5 as Grade, 'concord' as School from dual
),
mark as (
select 1 as Studentno, 'maths' as subject, 55 as mark from dual union all
select 1,'science', 23 from dual union all
select 1,'history', 99 from dual union all
select 2,'maths', 89 from dual union all
select 2,'science', 78 from dual union all
select 2,'history', 100 from dual union all
select 3,'maths', 77 from dual union all
select 3,'science', 82 from dual union all
select 3,'history', 78 from dual
)
select
s.Studentno, s.Studentname, s.Grade, s.School
,'maths' as subject1, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'maths') as mark1
,'science' as subject2, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'science') as mark2
,'history' as subject3, (select mark from mark m where s.Studentno = m.Studentno and m.subject = 'history') as mark3
from Student s
Result
1 1 aaaaa 3 cambridge maths 55 science 23 history 99
2 3 ccccc 5 concord maths 77 science 82 history 78
3 2 bbbbb 4 edison maths 89 science 78 history 100