Pergunta de entrevista da empresa J.P. Morgan

coding question regarding summary statistics and check two tables whether consistent