Pregunta de entrevista de Tata Consultancy Services

asked to write a basic code on array and one sql query using where condition