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" = 2023 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;149 rows
get_mother_collegeReligioncount
College of Arts and HumanitiesSDA341
College of Arts and HumanitiesRC52
College of Arts and Humanities26
College of Arts and HumanitiesCHR23
College of Arts and HumanitiesBAC14
College of Arts and HumanitiesN/A10
College of Arts and HumanitiesNone4
College of Arts and HumanitiesBAP4
College of Arts and HumanitiesSDA-REFORM3
College of Arts and HumanitiesAGNO2
College of Arts and HumanitiesISL1
College of Arts and HumanitiesEVC1
College of Arts and HumanitiesVCC1
College of Arts and HumanitiesBUD1
College of Arts and HumanitiesJIL1
College of Arts and HumanitiesPENTE1
College of Arts and HumanitiesATHEIST1
College of Arts and HumanitiesHIN1
College of Arts and HumanitiesMET1
College of Arts and HumanitiesUCG1
College of Arts and HumanitiesPROT1
College of BusinessSDA451
College of BusinessRC85
College of Business28
College of BusinessCHR28
College of BusinessBAC13
College of BusinessPROT5
College of BusinessBAP4
College of BusinessINC4
College of BusinessSDA-REFORM3
College of BusinessN/A3
College of BusinessEVC2
College of BusinessCOG1
College of BusinessPENTE1
College of BusinessUCCP1
College of BusinessAGNO1
College of BusinessISL1
College of BusinessMOR1
College of BusinessMET1
College of DentistrySDA281
College of DentistryRC80
College of DentistryBAC20
College of Dentistry18
College of DentistryCHR17
College of DentistryISL5
College of DentistryINC4
College of DentistryPROT3
College of DentistryPENTE2
College of DentistryJMC2
College of DentistryADD1
College of DentistryUCCP1
College of DentistryAGNO1
College of DentistryHIN1
College of DentistrySDA-REFORM1
College of DentistryCOG1
College of DentistryJIL1
College of DentistryUCG1
College of DentistryVCC1
College of DentistryBAP1
College of DentistryMOR1
College of DentistryCCF1
College of EducationSDA232
College of Education9
College of EducationSDA-REFORM5
College of EducationCHR4
College of EducationBAC3
College of EducationRC3
College of EducationBAP2
College of EducationNot in the list1
College of EducationPENTE1
College of EducationBUD1
College of EducationADD1
College of EducationN/A1
College of EducationINC1
College of EducationNone1
College of HealthSDA414
College of HealthRC98
College of Health28
College of HealthBAC23
College of HealthN/A22
College of HealthNone19
College of HealthCHR14
College of HealthBAP8
College of HealthPROT8
College of HealthSDA-REFORM5
College of HealthPIC3
College of HealthINC2
College of HealthISL2
College of HealthPENTE2
College of HealthANGLICAN1
College of HealthATHEIST1
College of HealthMET1
College of HealthEVC1
College of HealthADD1
College of HealthUCCP1
College of HealthUCG1
College of HealthMistica1
College of MedicineSDA66
College of MedicineRC24
College of MedicineBAC9
College of Medicine4
College of MedicineCHR3
College of MedicineSDA-REFORM2
College of MedicinePIC1
College of MedicineBAP1
College of MedicineJIL1
College of NursingSDA495
College of NursingRC100
College of Nursing60
College of NursingCHR34
College of NursingBAC13
College of NursingPROT7
College of NursingSDA-REFORM6
College of NursingBAP4
College of NursingN/A3
College of NursingPENTE3
College of NursingINC3
College of NursingADD2
College of NursingNone2
College of NursingISL2
College of NursingATHEIST2
College of NursingPIC2
College of NursingBUD1
College of NursingBAPTIST1
College of NursingCCF1
College of NursingCHRISTIAN1
College of NursingMOR1
College of NursingEVC1
College of Nursing 1
College of NursingMET1
College of Science and TechnologySDA143
College of Science and TechnologyRC23
College of Science and Technology13
College of Science and TechnologyBAC5
College of Science and TechnologyCHR4
College of Science and TechnologyNone2
College of Science and TechnologyMOR2
College of Science and TechnologyAGNO2
College of Science and TechnologyPROT2
College of Science and TechnologyISL1
College of Science and TechnologySDA-REFORM1
College of Science and TechnologyINC1
College of Science and TechnologyPIC1
College of Science and TechnologyATHEIST1
College of Science and TechnologyBAP1
College of TheologySDA116
College of TheologyCHR3
College of TheologySDA-REFORM2
SDA3