J.P. Morgan interview question

how does pivot table work?