find related people with one sql query