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" = 2025 and "Semester" = '2') 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;33 rows
get_mother_collegeReligioncount
College of Arts and HumanitiesSDA31
College of Arts and HumanitiesRC6
College of Arts and Humanities4
College of Arts and HumanitiesCCF1
College of Arts and HumanitiesATHEIST1
College of Arts and HumanitiesINC1
College of Arts and HumanitiesSDA-REFORM1
College of BusinessSDA23
College of BusinessRC8
College of BusinessCHR2
College of BusinessBAP1
College of Business1
College of BusinessCCF1
College of DentistrySDA12
College of DentistryRC4
College of DentistryBAC2
College of Dentistry1
College of EducationRC5
College of EducationSDA3
College of Education2
College of EducationEVC2
College of EducationISL1
College of HealthSDA19
College of Health4
College of HealthRC3
College of HealthBAC1
College of HealthVCC1
College of NursingSDA13
College of NursingRC4
College of NursingBAC1
College of Nursing1
College of Science and TechnologySDA1
College of TheologySDA1