title: Retrieve rows on the basis of repeating value of a column
body: <p>I want to retrieve data from my table <code>Card</code>.</p>
  
  <pre><code>table Card(
    MembershipNumber,
    EmbossLine,
    status,
    EmbossName
  )
  </code></pre>
  
  <p>Such that only those rows should be returned that have repeating MembershipNumber i.e having <code>count</code> greater than 1.
  Like if I Have following records</p>
  
  <pre><code>(11,0321,'active','John')
  (11,0322,'active','John')
  (23,0350,'active','Mary')
  (46,0383,'active','Fudge')
  (46,0382,'active','Fudge')
  (46,0381,'active','Fudge')
  </code></pre>
  
  <p>The query should return all records except the third one. Is it possible?</p>
  
  <p><strong>EDITED</strong> I got the answer for my question. I have another query. I want to filter the rows by <code>status</code> too but when I run the following query I dont get the desired result:</p>
  
  <pre><code>SELECT EmbossLine,Membershipnumber,status,embossname,*
  FROM   (SELECT *,
                 Count(MembershipNumber)OVER(partition BY EmbossName) AS cnt
          FROM   card) A
  WHERE cnt &gt; 1 AND status='E0'
  </code></pre>
  
  <p>Before Adding <code>status</code> in the where clause, it works perfectly fine. see Picture<a href="https://i.stack.imgur.com/bSqyr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bSqyr.png" alt="enter image description here"></a></p>
  
  <p>After adding filtering by status</p>
  
  <p><a href="https://i.stack.imgur.com/QLqAD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QLqAD.png" alt="enter image description here"></a></p>