Infosys interview question

Asked to write program based on arrays and asked SQL questions.