title: H2: Duplicate column names in count query with nested query
body: <p>I'm wondering whether is possible to keep table names in a nested query to avoid the <code>Duplicate column name</code> error.</p>
  
  <p>As a minimal example, I have the following tables:</p>
  
  <ul>
  <li>CUSTOMERS: ID, NAME, CITY_ID</li>
  <li>CITIES: ID, NAME, ZIP</li>
  </ul>
  
  <p>The following query fails with the error <code>Duplicate column name "NAME"</code>:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT COUNT(*) FROM (
    SELECT CUSTOMERS.NAME, CITY.NAME 
    FROM CUSTOMERS JOIN CITIES ON CUSTOMERS.CITY_ID = CITIES.ID
  )
  </code></pre>
  
  <p>Apparently H2 strips table names in the nested query, thus resulting in two columns named <code>NAME</code>
  (see <a href="https://stackoverflow.com/questions/47282769/count-with-subquery-fail-on-h2-database-with-duplicate-column-name">COUNT with subquery fail on H2 database with &quot;Duplicate column name&quot;</a>).</p>
  
  <p>A solution would be using column alias in the nested query, but I'd like to avoid it due to other project requirements (i.e., I'd like to use column identifiers generated with Jooq to build queries).</p>
  
  <p>Do you know a way to force H2 to keep table names in the nested query?</p>