Pregunta de entrevista de Citi

few questions using SQL, one Python question about array manipulation