首页 > 代码库 > oracle 前9天的数据

oracle 前9天的数据

SELECT qyv.*
  FROM (select ROW_NUMBER() OVER(PARTITION BY 1 order by cust_party_id DESC) rn,
              h.*
         FROM cop_customer_header_v h
                 where 1 = 1
                   and TRUNC(SYSDATE) -
                       TRUNC(decode(cust_creation_date,
                                    ‘‘,
                                    sysdate - 10,
                                    cust_creation_date)) >= 9) qyv
 where qyv.rn > 0
   AND qyv.rn <= 50;

oracle 前9天的数据