title: using dense_rank to find distinct
body: <p>I have a table something like this</p>
  
  <pre><code>Id  student_name    City
  4   abc             Mumbai
  6   xyz             Delhi
  4   lmn             Kolkata
  6   abc             Mumbai
  6   GHI             Chennai
  </code></pre>
  
  <p>I am using <code>dense_rank()</code> function to dismiss the duplicate entry of <code>ID</code> in the table means if I am having the <code>ID</code> 4 twice it should give me only once in the output.</p>
  
  <p>When I am using <code>dense_rank</code> function like:</p>
  
  <pre><code>select dense_rank() over (order by student_id desc  ) as ID ,Id, student_name,city
  from test
  </code></pre>
  
  <p>It is giving me the output something like this</p>
  
  <pre><code>ID  ID  student_name    city
  1   4   abc             Mumbai
  1   4   lmn             kolkata
  2   6   xyz             Delhi
  2   6   abc             Mumbai
  </code></pre>
  
  <p>But I don't want duplicate how to remove using <code>dense_rank()</code> function</p>