J.P. Morgan Interview Question

coding question regarding summary statistics and check two tables whether consistent