This should work for you. Though in a project with multiple levels you’ll need to group by levels too.