title: SELECT using timestamp in Oracle SQL
body: <p>my problem is trying to use a SELECT statement and order the top 10 by a certain column. I managed to compile something after searching through lots of forums, however I need to confirm that the timestamp in one field is within the last week. I have gotten this to execute however i'm not sure whether this is correct as I can't print the value for the where clause:</p>
  
  <pre><code>SELECT itemid, count(itemid) 
  FROM Rateddate 
  WHERE TO_CHAR(CURRENT_TIMESTAMP - DATE_RATED) &lt; TO_CHAR(7)  
  GROUP BY itemid;
  </code></pre>
  
  <p>TLDR:</p>
  
  <pre><code>TO_CHAR(CURRENT_TIMESTAMP - DATE_RATED) &lt; TO_CHAR(7)
  </code></pre>
  
  <p>does this make sure the date_rated timestamp is less than a week old?</p>