Pregunta de entrevista de IBM

to write queries i forgot the exact question