SELECT scg_code AS supervisor_code,
       scg_desc AS supervisor_desc,
       scg_org AS supervisor_org
FROM r5schedgroups s,
     r5userorganization u
WHERE s.scg_org = u.uog_org AND
      u.uog_user = <parameter.r5user> AND
      ( u.uog_common = '+' OR u.uog_org = <control.org> ) AND
      COALESCE(s.scg_notused, '-') <> '+';
