This is a premium problem. We're working on making it available for free soon.
Explore Free ProblemsSolutions for this premium problem will be available for free soon.
Watch expert explanations and walkthroughs
Jot down your thoughts, approach, and key learnings
Yes, problems like this appear in database-focused interview rounds, especially for roles requiring SQL proficiency. Companies often test your ability to use aggregations, joins, and window functions to filter grouped data.
The common approach is to identify the highest and lowest scores for each exam using aggregation or window functions. Students who achieve these extreme scores are excluded. The remaining students who took at least one exam are considered quiet.
The definition of a quiet student requires that they never appear as the top or bottom scorer in any exam they participated in. Therefore, identifying and removing those extreme-score cases ensures only consistently middle-scoring students remain.
SQL aggregation with GROUP BY and functions like MIN() and MAX() works well for this problem. Alternatively, window functions such as RANK() or DENSE_RANK() can rank scores within each exam and help identify extreme values efficiently.