Pergunta de entrevista da empresa Goldman Sachs

he asked me to write the syntax for the trigger