Students and Instructors for Database Systems
Reported by candidates from Kickdrum's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Kickdrum's September 2026 OA includes a SQL question with one very specific filter: the course name has to be exactly Database Systems, case-sensitive. Four tables, three joins, one ordered result. It looks like a warm-up, and it is, but the duplicate-enrollment rule trips people who rush. If you've got an invite in your inbox, this is a question you can nail in about ten minutes once you see the shape. And if your mind goes blank mid-assessment, StealthCoder runs invisibly on your desktop and can hand you the query as a safety net.
The problem
You are given four relational tables describing students, their course enrollments, courses, and instructors. Return the name of every student enrolled in a course whose name is exactly Database Systems, together with that course's instructor name. Tables students: student_id PK (Integer), student_name (Text) enrollments: enrollment_id PK (Integer), student_id (Integer), course_id (Integer) courses: course_id PK (Integer), course_name (Text), instructor_id (Integer) instructors: instructor_id PK (Integer), instructor_name (Text) Constraints Each table's declared primary key is unique and non-null. Every enrollment references an existing student and course, and every course references an existing instructor. The course-name comparison is case-sensitive and must equal Database Systems. Return one row per matching enrollment, ordered by student_name ascending and then instructor_name ascending. Within enrollment, enrollment_id is the only uniqueness constraint; multiple rows may share the same student and course, and each matching enrollment produces one output row.
Reported by candidates. Source: FastPrep
Pattern and pitfall
The pattern is a straight chain of inner joins: students to enrollments on student_id, enrollments to courses on course_id, courses to instructors on instructor_id. Filter with WHERE course_name = 'Database Systems'. Then ORDER BY student_name ASC, instructor_name ASC. The trap is deduplication. The statement says enrollment_id is the only uniqueness constraint, so the same student can appear in the same course multiple times, and each enrollment must produce its own output row. Don't add DISTINCT and don't GROUP BY. Another pitfall is case sensitivity. Some databases compare text case-insensitively by default, so stick with a plain equality against the exact string and don't wrap it in LOWER(). Since every foreign key is guaranteed to resolve, inner joins are safe and you don't need LEFT JOINs or NULL handling. If you freeze on the join order during the live OA, StealthCoder is the hedge that reads the schema and gives you the query.
If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.
You can drill Students and Instructors for Database Systems cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Kickdrum's OA.
Kickdrum reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Students and Instructors for Database Systems FAQ
How hard is the Kickdrum Students and Instructors query really?+
Easy. It's a four-table join with one equality filter and a two-column sort. No window functions, no aggregation, no NULL handling. The only real risk is overthinking it or adding DISTINCT, which would wrongly collapse duplicate enrollments.
What's the trick in this question?+
Keep one row per enrollment. The statement says a student can be enrolled in the same course multiple times, and each matching enrollment counts. So skip DISTINCT and GROUP BY, and just join, filter, and sort.
Do I need LEFT JOIN or NULL checks?+
No. The constraints guarantee every enrollment points to a real student and course, and every course points to a real instructor. Inner joins return exactly what's needed, and LEFT JOINs would just add noise without changing the result.
How should I handle the case-sensitive course name?+
Compare directly with course_name = 'Database Systems'. Don't use LOWER, UPPER, or LIKE. The statement requires an exact, case-sensitive match, so a plain equality on the literal string is both correct and the simplest thing to write.
How do I prepare for this in 48 hours?+
Write a multi-table join from memory a few times, then practice ORDER BY with two columns. Reread the constraints for duplicate rules before you write anything. That covers this question and most similar join-and-filter SQL tasks on an OA.