Quiet Students

ASKED IN INTERVIEW
10pts
Google

Problem Statement

A student is "quiet" if they took at least one exam but never scored the highest or lowest in any exam. Find these students.

Rules:

  • Output columns: student_id, student_name.
  • Highest/Lowest is calculated per exam_id.
  • Exclude any student who was the high or low scorer even once.
  • Sort by student_id ASC.
Tests your understanding of
Window Functions, Filtering, Subqueries and Exclusion Logic

Input Tables

students
student_id(INTEGER)student_name(VARCHAR)
1Daniel
2Jade
3Stella
4Jonathan
exams
exam_id(INTEGER)student_id(INTEGER)score(INTEGER)
10170
10280
10390
20180
30170
30380
30490
40160
40270
40480
courses
exam_id(INTEGER)course_name(VARCHAR)
10Math

Expected Output

student_id(INTEGER)student_name(VARCHAR)
2Jade

Tags

HardASKED IN INTERVIEWWindow FunctionsFilteringSubqueriesExclusion Logic
30-40 min
38%

Hints