Pregunta de entrevista de Anonymous

I was asked write sql query