Infosys interview question

Technical java and sql question