title: row number partition doesn't work
body: <p>I've a problem. Don't know why.</p>
  
  <pre><code>select ROW_NUMBER() OVER (PARTITION BY a.rmid, c.nama ORDER BY a.tanggalrekam) rn,
         a.rmid, a.psid, c.nama, a.tanggalrekam
  from _tRekamMedis a
  inner join _tRekamMedisTindakan b on a.rmid= b.rmid
  inner join _tPasien c on a.psid = c.psid
  inner join _tSecurityUser d on b.dokterid = d.securityuserid
  inner join _tTindakan e on b.tindakanid = e.tindakanid
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>    rn  rmid    psid    nama        tanggalrekam    dokterid
      1   1       1       Fauzan      2017-06-20      -2147483648
      2   1       1       Fauzan      2017-06-20      -2147483648
      3   1       1       Fauzan      2017-06-20      -2147483648
      1   2       2       Huri        2017-06-20      -2147483648
  </code></pre>
  
  <p>It should be:</p>
  
  <pre><code>    rn  rmid    psid    nama        tanggalrekam    dokterid
      1   1       1       Fauzan      2017-06-20      -2147483648
      1   1       1       Fauzan      2017-06-20      -2147483648
      1   1       1       Fauzan      2017-06-20      -2147483648
      2   2       2       Huri        2017-06-20      -2147483648
  </code></pre>
  
  <p>the <code>rownumber</code> doesn't work. It shows on <code>rn</code> field. Anyone can help? </p>