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
- #41You're analyzing user engagement for a social media platformeasy
- #43A regional bank wants to analyze account activity by branch locationeasy
- #44A medical clinic wants to identify patients who have been prescribed medications...easy
- #42A video streaming platform tracks user viewing sessionshard
- #45A mobile gaming company wants to identify the top 3 most active players for each...easy
← Back homemockbit.io/q/51