title: Delete duplicated records Firebird SQL
body: <p>I want to delete duplicated rows, so I used this select statement to find all duplicated rows.</p>
  
  <pre><code>SELECT * FROM MY_CARD T1
  INNER JOIN( SELECT IDCARD, YEAR FROM MYCARD GROUP BY IDCARD, YEAR HAVING COUNT(IDCARD) &gt; 1 ) T2 ON T1.IDCARD = T2.IDCARD AND T1.YEAR=T2.YEAR
  WHERE T1.IDRODZ = 5 AND IDCARD=80;
  </code></pre>
  
  <p>My result looks like that, but this is only short example, there are more duplicated records.</p>
  
  <pre><code> ID   IDCARD    YEAR IDRODZ
   1     80   2014    5
   2     80   2014    5
   3     80   2014    5
   4     80   2015    5
   5     80   2015    5
   6     80   2015    5
  </code></pre>
  
  <p>I need delete statement, that helps me to delete duplicated values, so that my table could look like that:</p>
  
  <pre><code> id  IDCARD   YEAR  IDRODZ
    1  80        2014      5
    4  80        2015      5
  </code></pre>
  
  <p>How can I achieve it?</p>