title: Select rows where ColA=ColB and also add a new column that tells whether the original data in ColA is repeated
body: <p>I am trying to figure out how to query a table (the table is actually a result set, so it will be a subquery), group it by <code>ColA=ColB</code> (see below), and create a calculated field all in one step.</p>
  
  <p>So, if my test data looks like </p>
  
  <pre>ColA    ColB    ColC </pre>    
  
  <pre>
  1       1       aaa 
  1       2       bbbb    
  1       3       cccc    
  2       2       dddd    
  3       3       eeee    
  3       4       ffff    
  3       5       gggg    
  3       6       hhhh    
  4       4       iiii    
  5       5       jjjj    
  6       6       kkkk    
  6       7       llll    
  6       8       mmmm    </pre>
  
  <hr>
  
  <p>I would like to retrieve only rows where <code>ColA=ColB</code> and also add a new column that tells me whether the original data in <code>ColA</code> was repeated.  See below.  </p>
  
  <pre>ColA   ColB    ColC    multiples</pre>
  
  <pre>1      1       aaaa    yes
  2       2       dddd    no
  3       3       eeee    yes
  4       4       iiii    no
  5       5       jjjj    no
  6       6       kkkk    yes</pre>
  
  <p>Can someone help me out with the syntax?  I have been playing with Group By's and SubSelects to no avail.  Do I need to use a case statement to for the multiples field? </p>