title: How to join sub-queries in PL/SQL?
body: <p>i need to join subqueries in oracle. This does not work i get a syntax error for the join operation</p>
  
  <pre><code>select s1.key, s1.value, s2.value 
  from ((select key, value
          from tbl 
          where id = 1) as s1
  join 
      (select key, value
          from tbl 
          where id = 2) as s2
  on s1.contract = s2.contract);
  </code></pre>