betterworks interview question

Few SQL Questions, and a Problem Solving