Merging rows and combining their column values

can you please share the output also for reference.