Oracle Connect BY return top level only
<p>I am trying to get the top most parent of a record using connect by</p>

<pre><code>Select distinct parent_box_id,box_id, 
LEVEL,
SYS_CONNECT_BY_PATH(box_id, '&gt;') "lineage"

  FROM box_lineage lineage 
  where lineage.position = 1 
        START WITH   box_id='00112233   '
   CONNECT BY   box_id = PRIOR parent_box_id
      ORDER SIBLINGS BY box_id;
</code></pre>

<p>result</p>

<pre><code>    parent child level hierarchy
    123456  789456  3   &gt;00112233&gt;963258&gt;789456
    789456  963258  2   &gt;00112233&gt;963258
    963258  00112233    1   &gt;00112233
</code></pre>

<p>What I want is only <code>123456  789456  3   &gt;00112233&gt;963258&gt;789456
</code></p>

<p>I don't know what the top level is it could be 2,3,4 5, 6</p>

<p>I tried <code>and level &gt;=3</code> and <code>level 1</code> but I only get the bottom level</p>

<p>I've read the other answers on here but none worked</p>