Buk (Chile) interview question

Problema de SQL. . . . .