title: SQL Command not properly ended?
body: <p>I am using a SQL statement with a Temporary relation, and am getting the error <code>ORA-009933: SQL command not properly ended</code></p>
  
  <p>I don't see anything wrong with the statement, so any assistance is greatly appreciated. The statement is:</p>
  
  <pre><code>SELECT Temp.name,
         Temp.AvgSalary
  FROM   (SELECT A.aid,
                 A.aname       AS name,
                 AVG(E.salary) AS AvgSalary
          FROM   Aircraft A,
                 Certified C,
                 Employees E) AS Temp; 
  </code></pre>
  
  <p>Thanks</p>