title: MySql date_sub() function in Hibernate Query Language and find last week date range
body: <p>how can I make the following hql query to retrieve records with timestamp of the last week?</p>
  
  <p><code>timestamp</code> in MySQL <code>DATETIME</code> type (eg: 05/07/2012 11:51:34)</p>
  
  <pre><code>select * from transaction
  where timestamp between date_sub(now(),INTERVAL 1 WEEK) and now();
  </code></pre>