Connect by Distance SOP: groups work properly (+example)