title: invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
body: <pre><code>use qcvalues_test
  go
  
  select [finalConc]
        ,[rowid] from qvalues where rowid in (select rowid from batchinfo where instrument = 'TF1') 
  and name='qc1'
  and compound='etg'
  group by finalConc
  having COUNT(rowid)=2
  </code></pre>
  
  <p>why am i getting this error</p>
  
  <blockquote>
    <p>Msg 8120, Level 16, State 1, Line 3
    Column 'qvalues.rowid' is invalid in
    the select list because it is not
    contained in either an aggregate
    function or the GROUP BY clause.</p>
  </blockquote>