title: In a Sub-Select, select Column from a Max-ID Row without ORDER BY
body: <p>I'm using Oracle 19c. I'm not allowed to have Sub-Selects with ORDER BY.</p>
  <p>I need to get certain columns from a Max-ID row as a Sub-Select (because of a Hibernate Formula):</p>
  <p><strong>Plans.java</strong> PLANS_T Domain Object</p>
  <pre><code>@Formula(value=&quot;
  (SELECT wf.last_changed_date 
   FROM plan_workflow_t wf 
   WHERE wf.plan_id = id and rownum = 1 order by id desc)
  &quot;)
  </code></pre>
  <p>Is there a way to rewrite this without ORDER BY/rownum but keep it a Sub-Select?</p>
  <p>I can't do <code>max(last_changed_date)</code>. The Max LastChangedDate can be on a different row than the latest row by ID; this means that the latest row by ID would have a NULL LastChangedDate, and that's what I have to return. So I need to grab specific columns (in this case <code>last_changed_date</code>) from the Max-ID row.</p>