HGS interview question

Advance excel and pivot. sql queries