Mockbit/#51
SQLeasySubqueries~12m

EduTech University wants to identify students who are performing above the...

Problem

EduTech University wants to identify students who are performing above the average GPA in their specific program (major). Write a query to find all students whose GPA is higher than the average GPA of all students in the same program. Return the student name, program, their GPA, and the program's average GPA (rounded to 2 decimal places). Handle cases where students might not have a declared program (NULL major) by excluding them from the results.

Examples

Example 1

Example 2

Constraints
  • Return student name, major (program), student GPA, program average GPA
  • Round program average GPA to 2 decimal places
  • Exclude students with NULL major
  • Only include students whose GPA exceeds their program average
Reference solution

Reference solution available after you attempt the question.

Ready to solve it?

Start a session on Mockbit #51. Write your SQL, run it against real data, and get graded on correctness, efficiency, query structure, and business understanding.

Related SQL questions
← Back homemockbit.io/q/51
PrivacyTerms© 2026 Mockbit