Achieve interview question

General SQL questions and some root cause analysis