Highest performing students by college program

Question

Suppose you're given the tables below, containing information about various college programs, as well as students currently enrolled in the listed universities. Note that 'college_name_program_id' is a unique identifier for the college/program combination.

Table: college_info

college_name_program_id college_name college_program
00001 University A Engineering
00002 University A Business
00003 University A Mathematics
00004 University B Engineering
00005 University B Business
00006 University B Mathematics
00007 University C Engineering
00008 University C Business
00009 University C Mathematics

Table: student_apps

student_id college_name_program_id gpa
31331 00001 2.8
34583 00001 3.1
23455 00002 3.5
23454 00005 3.8
22337 00007 2.5
00112 00009 3.3
12332 00004 3.4
99123 00003 2.1
87903 00002 4
23547 00002 3.7
66543 00003 3.6
34554 00001 3.1

Using the tables above, write a SQL query to return the number of students in each department/program (agnostic of university) that have a GPA of at least 3.3.

You can view/query this table in an interactive SQL fiddle here.

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now