GSK Interview Question

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