Amazon Robotics Interview Question

SQL aggregation coding, including group by and having.