title: how to get a select count(x) from a query of table names
body: <p>I have a query the brings back a list of tables and the counts of those tables.</p>
  
  <pre><code>select *
  from error
  </code></pre>
  
  <p>with a result of </p>
  
  <pre><code>tablename | errorcnt
  ----------+---------
  table1    |        5
  table2    |      256
  </code></pre>
  
  <p>and so on.<br>
  I need to do a <code>join</code> so I can get another count from each table as to the records that have been corrected example</p>
  
  <pre><code>select count(fixed)
  from table1
  </code></pre>
  
  <p>so my new result would be</p>
  
  <pre><code>tablename | errorcnt | fixed
  ----------+----------+------
  table1    |        5 |     3
  table2    |      256 |   239
  </code></pre>
  
  <p>and so on.<br>
  Without doing a cursor how could I do? I guess a sub query using 'tablename'.</p>