GSK interview question

Selecting some rows , marging them . How did I approach a hard problem .