title: How do I get this result usin oracle query
body: <p>First, with one collateral, you can borrow money many times from bank. It means that one collateral_num have many loan_num.</p>
  
  <p>Second, you can serve many collaterals to one loan. It means that one loan_num have many collateral_num.</p>
  
  <p>There is a table like this named LOAN.</p>
  
  <pre>
  collateral_num | loan_num
  -------------------------
   C1            |  A5
   C2            |  A5
   C2            |  A1
   C3            |  A1
   C3            |  A3
   C6            |  A7
   C7            |  A7
  </pre>
  
  <p>I want to get minimum collateral_num from LOAN like this table below.
  I will explain minium clooateral_num.
  There are two group in the first table. One of them is from first row to fifth row. Then, we can find some relationship like  C1→a5→c2→a1→c3→a3 in the first group.
  And we discard the nodes including 'a'.
  As a result c1 will be minimum collatral num  in c1  c2  c3.(because c1 has the least number.)</p>
  
  <p>In the second group (c6→a7→c7)minimum collatral num will be c6.</p>
  
  <pre>
  collateral_num | minimum_collateral_num | loan_num
  --------------------------------------------------
   C1            |   C1                   |    A5
   C2            |   C1                   |    A5
   C2            |   C1                   |    A1
   C3            |   C1                   |    A1
   C3            |   C1                   |    A3
   C6            |   C6                   |    A7
   C7            |   C6                   |    A7
  </pre>
  
  <p>How do I make SQL query to make the result I've told. Any comment will be helpful for me. Thanks.</p>