title: Select only duplicate records based on few columns
body: <p>i have a table with 3 columns. It is having duplicate on column 2 and 3. I need to select pnly the duplicate rows (with all the 3 columns). How to do that? pls help me.</p>
  
  <p><code>var1   var2    var3</code> </p>
  
  <p><code>a          a           a<br>
  b           a           a<br>
  c           a           a<br>
  d           b           b<br>
  e           c           c</code></p>
  
  <p>The above is the table structure. It has 3 columsn var1, var2, var3. Based on column var2 and var3 only, we have to assume it is duplicate records. We should not consider var1 while finding the duplicate. Sorry about the alignment.</p>
  
  <p>I have used the below query to get all the rows with / without duplicate but with the rank to identify the duplicate records. But i could not get only the duplicate records.</p>
  
  <p><code>select var1,var2,var3,ROW_NUMBER() over(PARTITION BY
  var2,var3 order by var2,var3) as rnk 
   from vart</code></p>
  
  <p>Apart from this, how i can get the maximum rank records amoung the duplicate entries ? 
  Thanks.</p>