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" = '0') 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;36 rows
get_mother_collegeReligioncount
College of BusinessSDA1
College of DentistrySDA81
College of DentistryRC28
College of Dentistry10
College of DentistryBAC8
College of DentistryCHR6
College of DentistryINC2
College of DentistryMOR1
College of DentistryPROT1
College of DentistryVCC1
College of DentistryJMC1
College of DentistryUCG1
College of HealthNone2
College of HealthSDA1
College of MedicineSDA21
College of MedicineRC4
College of MedicineBAC3
College of MedicineN/A1
College of NursingSDA350
College of NursingRC64
College of Nursing51
College of NursingCHR15
College of NursingBAC13
College of NursingISL5
College of NursingPROT5
College of NursingSDA-REFORM4
College of NursingINC4
College of NursingPIC2
College of NursingBAP2
College of NursingPENTE1
College of NursingN/A1
College of NursingAGNO1
College of NursingMOR1
College of Science and TechnologySDA2
College of Science and Technology1
College of Science and TechnologyPROT1