Deloitte interview question

3 coding questions prime number ,SQL second highest salary