Naaptol interview question

Write query on sum joins concat