select get_mother_college, "Religion", count(*) from (select "Religion", get_mother_college(get_student_course) from students2, (select *, get_student_course(20000000+"Student ID") from (select distinct ("Student ID") from grades where "Year" = 2024 and "Semester" = '1') as foo) as bar where students2."Student ID" = bar."Student ID" order by get_mother_college, get_student_course) as bar2 group by get_mother_college, "Religion" order by get_mother_college, count desc;1 rows
get_mother_collegeReligioncount
College of NursingSDA4