Pregunta de entrevista de Amazon Robotics

Medium SQL question on groups and CTEs