title: How to save jooq table as a variable and then reference it
body: <p>This is my sql statement:</p>
  
  <pre><code>select count(*) from source s
  join(select id as I from source where name is not null) e
  on s.name = e.I
  </code></pre>
  
  <p>Here is what I have in java</p>
  
  <pre><code>    Source s = SOURCE.as("s");
      TableLike&lt;?&gt; e = create.select(SOURCE.ID.as("I"))
              .from(SOURCE)
              .where(SOURCE.NAME.isNotNull()
              .asTable().as("e");
  
      create.selectCount()
      .from(s)
      .join(e)
      .on(s.NAME.equal(e.I))
      .fetchOne().value1();
  </code></pre>
  
  <p>I think that TableLike is not the right type because I get an error when I try to do e.I</p>