If your Oracle version is 19c or later then use Query#1 or for older version use Query#2.
CREATE TABLE mytable (Student_ID int, Year_of_paid_fee int);
Insert INTO mytable VALUES (101, 2018);
Insert INTO mytable VALUES (101, 2019);
Insert INTO mytable VALUES (101, 2021);
Insert INTO mytable VALUES (102, 2018);
Insert INTO mytable VALUES (102, 2021);
Query#1 (For Oracle 19c and later)
with allyears as
(
select 2018 yr from dual
union all
select 2019 from dual
union all
select 2020 from dual
union all
select 2021 from dual
)
select mt.student_id , LISTAGG(distinct yr, ',') WITHIN GROUP (ORDER BY yr) Year_of_Default
from mytable mt cross join allyears
where not exists(select * from mytable m WHERE mt.student_id=m.student_id and yr=m.YEAR_OF_PAID_FEE)
group by mt.student_id
Query#2 (For older version of oracle than 19c)
with allyears as
(
select 2018 yr from dual
union all
select 2019 from dual
union all
select 2020 from dual
union all
select 2021 from dual
)
,cte as
(
select distinct mt.student_id , yr
from mytable mt cross join allyears
where not exists(select * from mytable m WHERE mt.student_id=m.student_id and yr=m.YEAR_OF_PAID_FEE)
)
select student_id, LISTAGG(yr,',') WITHIN GROUP (ORDER BY yr) Year_of_Default
from cte
group by student_id
Output:
| STUDENT_ID |
YEAR_OF_DEFAULT |
| 101 |
2020 |
| 102 |
2019,2020 |
db<fiddle here