FastPrepContest Participants with Long Totals and Short Questions
Problems/Contest Participants with Long Totals and Short Questions

Contest Participants with Long Totals and Short Questions

The Walt Disney Company logoThe Walt Disney Company● MediumFULLTIMEONSITE INTERVIEW
QuestionConstraints

Problem statement

Source note: The report gives participant and answer-submission tables and asks for names with total time above thirty minutes and every question completed within ten minutes, sorted by total time. This practice supplies the participant join column, whole-second UTC types, one completed question per row, all-judgement counting and an ID tie-break. The report mentions window-function follow-ups without their wording; those are not reconstructed here. About 85% of the reported core query is represented, as an editorial estimate.

Return the names of participants whose total recorded question-solving time is more than 30 minutes and whose every recorded question took at most 10 minutes. Sort by total time ascending, then participant ID ascending to break ties.

For this exercise, participants.id joins to submissions.participant_id. Each submission row represents one completed question for that participant, and all judgement values count. Repeated submissions for the same question are outside this practice dataset. Measure duration as ended_at minus started_at in whole seconds.

Participants with no submissions do not qualify. Different participants with the same name each keep their own result row. Return one column named participant_name; total time is used for filtering and ordering but is not an output column.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

participants

One row per participant. Names may repeat.

ColumnTypeNullableDescription
idPKIntegerNoParticipant identifier.
nameTextNoParticipant name.
group_nameTextNoReported group; it does not affect this query.

submissions

Each row is one completed question for one participant; repeated question rows are outside this exercise. All judgements count.

ColumnTypeNullableDescription
submission_idPKIntegerNoUnique submission identifier.
participant_idIntegerNoParticipant owning this completed question.
started_atTimestampNoWhole-second UTC start time.
ended_atTimestampNoWhole-second UTC end time, not earlier than start.
judgementTextNoRecorded judgement; no acceptance filter applies.

Foreign key: participant_id → participants(id)

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
participant_nameTextNoOne row per qualifying participant, with duplicate names retained.

Row order: must match exactly. Numeric tolerance: 0.

Constraints

  • All columns are non-null and each table follows its declared primary and foreign keys.
  • Timestamps are whole-second UTC instants and ended_at is not earlier than started_at.
  • The total bound is strictly greater than 1800 seconds; the individual bound is inclusive at 600 seconds.
  • Names need not be unique.

More The Walt Disney Company problems

  • Find All Paths for a Name in a File SystemPHONE SCREEN · Seen Nov 2026
  • Resizable Array-Backed Integer SetPHONE SCREEN · Seen Sep 2026
  • Shortest Path with Directional Move CostsPHONE SCREEN · Seen Sep 2026
All The Walt Disney Company interview questionsSee The Walt Disney Company hiring insights