PointClickCare interview question

SQL technical question from leetcode.