Pergunta de entrevista da empresa Nagarro

They asked me to solve a question on arrays which they gave ,1 dbms ques and 1 sql query