LTM Limited interview question

Question on SQL stored procedures