title: SQL Inner join on select statements
body: <p>I am trying to make an inner join on a select statement like this:</p>
  
  <pre><code>select *
  from (select* from bars  where rownum &lt;= 10 )as tab1
  inner join (select * from bars  where rownum &lt;= 10 )as tab2
  on tab1.close=tab2.close
  </code></pre>
  
  <p>and I get the following error:
  ORA-00933 SQL command not properly ended
  Any help would be appreciated, thank you!</p>