title: How to get Row Count in table in Oracle RDS
body: <p>I have a table as follows...</p>
  
  <pre><code>--------------------------------------------------------------
  TRANS_TYPE_CD | Member_ID | POINT_ACCOUNT_TYPE |  TRANS_DTM
  --------------------------------------------------------------
  Debit         | 1702      | 10                 | 2018-12-04
  Credit        | 1702      | 10                 | 2018-12-04
  Debit         | 1702      | 10                 | 2018-12-04
  Debit         | 1702      | 10                 | 2018-12-04
  Debit         | 1702      | 10                 | 2018-12-04
  ------------------------------------------------------------
  </code></pre>
  
  <p>Now I want select data from this table with row count. 
  For that purpose, I am using this SQL...</p>
  
  <pre><code>select rowNumber, trans_dtm, lower(trans_type_cd) as trans_type_cd
  from   (
          select pttrans.trans_dtm, pttrans.trans_type_cd
               , row_number() over (partition by trans_dtm order by trans_dtm desc ) as rowNumber
          from   (
                   select * from point_trans
                   where  member_id = 1702
                   and    point_account_type = 10 
                   and    (point_type_cd is null or point_type_cd not in ('Hold' ,'RolledBack','Rolledback'))
                   and    trans_dtm between to_date('2014-06-30', 'yyyy-mm-dd') and to_date('2018-12-04', 'yyyy-mm-dd')
                 ) pttrans
          fetch first 300 rows only
         )
  where rowNumber between 1 and 10
  order by trans_dtm desc;
  </code></pre>
  
  <p>But in output, as rowNumber I am getting 1 always.... and that is why "rowNumber between 1 and 10" clause is not working properly... </p>
  
  <p>The result I am getting ... </p>
  
  <pre><code>rowNumber | TRANS_DTM   | TRANS_TYPE_CD
  -----------------------------------------
  1         | 2018-12-04 | debit
  1         | 2018-12-04 | debit
  1         | 2018-12-04 | debit
  1         | 2018-12-04 | credit
  -----------------------------------------
  </code></pre>
  
  <p>Can any one help me out with proper SQL. My requirement is simply to get the row number and filter out the rows depending on param. </p>
  
  <p>I am using AWS Oracle RDS....</p>
  
  <p>Thanks in advance... </p>