title: How to write union query in jOOQ with single order by clause?
body: <p>Try it From <a href="http://www.jooq.org/doc/3.2/manual/sql-building/sql-statements/select-statement/union-clause/#N10EC1" rel="nofollow">Docs</a>:</p>
  
  <p>Code here:</p>
  
  <pre><code>SelectQuery&lt;Record&gt; selectQuery=Transaction.current().selectQuery();   
  selectQuery.addSelect(Property.PROPERTY.PROPERTY_RSN);  
  selectQuery.addFrom(Property.PROPERTY);  
  SelectQuery&lt;Record&gt; selectUnionQuery=Transaction.current().selectQuery();  
  selectUnionQuery.addSelect(Folder.FOLDER.FOLDER_RSN);  
  selectUnionQuery.addFrom(Folder.FOLDER);  
  selectQuery.union(selectUnionQuery);  
  selectQuery.addOrderBy(Folder.FOLDER.FOLDER_RSN);  
  selectQuery.fetch();  
  </code></pre>
  
  <p>Anyone can help me how can resolve this issue ?</p>
  
  <p>Thanks</p>