title: Column alias in `ORDER BY` expression?
body: <p>In Oracle 12.1.0.2 and Oracle 19c, this query:</p>
  
  <pre><code>with test_data (c1, c2) AS (
  SELECT 'A', 1 FROM DUAL UNION ALL
  SELECT 'B', 2 FROM DUAL UNION ALL
  SELECT 'C', 3 FROM DUAL )
  SELECT c1, c2*-1 c2
  FROM test_data
  order by c2*-1;
  </code></pre>
  
  <p>Returns:</p>
  
  <blockquote>
  <pre><code>+----+----+
  | C1 | C2 |
  +----+----+
  | A  | -1 |
  | B  | -2 |
  | C  | -3 |
  +----+----+
  </code></pre>
  </blockquote>
  
  <p>In other words, the <code>c2</code> in <code>ORDER BY c2*-1</code> referring to the <code>c2</code> column alias in the SELECT list and NOT the <code>c2</code> column in the database table.</p>
  
  <p>My reading of the <em>Oracle SQL Reference Guide</em> makes me think that the query result above is incorrect and that it is not appropriate for Oracle to think that an identifier in an <code>ORDER BY</code> expression refers to a column alias.</p>
  
  <p>Has Oracle always behaved like this and I just never noticed?  Is there something in Oracle's documentation that indicates the results above are correct and expected?</p>