LTM Limited interview question

Second highest salary in spark and sql