title: how to correctly write an alias in a query SQL oracle
body: <p>This is my query</p>
  
  <pre><code>CREATE VIEW CourseQueuePositions AS
  SELECT t2.code , t2.cid , 
  (SELECT COUNT(*) as queue 
  FROM Waits t1
  WHERE t2.code = t1.code AND t1.queue# &lt;= t2.queue#)
  FROM Waits t2;
  </code></pre>
  
  <p>I keep getting this compile error 
  Error at Command Line : 3 Column : 9
  00998. 00000 -  "must name this expression with a column alias"</p>
  
  <p>although the Oracle SQL developer doesn't indicate any error beforehand. Also I believe that I am using the alias "query" so I really don't understand. Help would be appreciated</p>