Pregunta de entrevista de J.P. Morgan

coding question regarding summary statistics and check two tables whether consistent