title: SQL Error : column ambiguously defined with subquery
body: <p>I'm trying to make a paged display, I've had succes before  with this pattern, but this one doesn't work for some reason:</p>
  
  <p>This works, </p>
  
  <pre><code>select e.data,e.onorar,d.data,d.suma 
  from contract_j e 
  join rata d on e.id_cj = d.id_cj 
  join persoana l on l.id_p = e.id_avocat
  </code></pre>
  
  <p>but this doesnt</p>
  
  <pre><code>select * from (
  select a.*, rownum as rnum from (
  
  select e.data,e.onorar,d.data,d.suma 
  from contract_j e 
  join rata d on e.id_cj = d.id_cj 
  join persoana l on l.id_p = e.id_avocat) a 
  
  where rownum &lt;= :maxrow) 
  where rnum &gt;= :minrow
  </code></pre>
  
  <p>It says column ambiguously defined at line 2</p>
  
  <p>Why? I can't figure it out.. </p>