Warner Bros. Discovery interview question

Why did you approach this SQL question this way?