J.P. Morgan interview question

coding question regarding summary statistics and check two tables whether consistent