Enliten IT India interview question

Logic check Some sql query