title: Oracle/PLSQL Recursion
body: <p>I have a table like:</p>
  
  <pre><code>+------+------+--------+------+
  |      |      |  UOM   |      |
  | ITEM | UOM  | BEFORE | SOLD |
  +------+------+--------+------+
  |  1   | Case |  Box   |  Y   |
  |  2   | Each |  Oz    |      |
  |  1   | Box  |  Each  |  Y   |
  |  1   | Each |  Oz    |      |
  |  2   | Case |  Box   |  Y   |
  |  2   | Box  |  Each  |  Y   |
  +------+------+--------+------+
  </code></pre>
  
  <p>How can I query it so I get results like:</p>
  
  <pre><code>+------+-------+------+
  | ITEM |  UOM  | SOLD |
  +------+-------+------+
  |  1   | Case  |  Y   |
  |  1   | Box   |  Y   |
  |  1   | Each  |  Y   |
  |  1   | Oz    |      |
  |  2   | Case  |  Y   |
  |  2   | Box   |  Y   |
  |  2   | Each  |  Y   |
  |  2   | Oz    |      |
  +------+-------+------+
  </code></pre>
  
  <p>Listing each unit of measure that the item is sold, descending from the highest UOM down to the lowest, where sold is null?</p>
  
  <p>Thanks for the help!</p>