1 2 Previous Next 16 Replies Latest reply on Mar 20, 2013 2:37 AM by Manik Go to original post
      • 15. Re: How to select the third 1000 unique record?
        997641
        Lets say in my Accounts table, I have a column called sys_creation_date and I need to pick distinct Accounts that are more than 10 days old but less than 20 days old. What would be the best query for that?
        • 16. Re: How to select the third 1000 unique record?
          Manik
          Something like this??
          SELECT distinct col 
            FROM (    SELECT SUBSTR (ROWNUM, 1, 1) col,
                             SYSDATE + (-1) * ROWNUM sys_creation_date
                        FROM DUAL
                  CONNECT BY ROWNUM <= 100)
           WHERE sys_creation_date BETWEEN (SYSDATE - 20) AND (SYSDATE - 10);
          Observe the date condition.. (if I got you correct..) and the distinct key word on col.. Use this as template to solve your purpose.

          Cheers,
          Manik.
          1 2 Previous Next