Pregunta de entrevista de Enzigma

In f2f round they ask to write a query on database