私の理解が正しければ、最初に所有者の名前で家族を並べ、次に扶養家族の名前で並べてください。以下はそれを行います。
with family_order as ( select idfamily, rownum r from ( select idfamily from costumer where relation = 'H' order by name ) ) select c.* from costumer c inner join family_order fo on c.idfamily = fo.idfamily order by fo.r, relation desc, name
プレ>