title: timestamp between date range
body: <p>I am trying to find all record count for each day using query:</p>
  <pre><code>select cast(Timestamp_field as date), count(*) as cnt
  from table1 
  group by 1 
  having cast(Timestamp_field as date) between date and date -10;
  </code></pre>
  <p><code>Timestamp_field</code> is a timestamp and I am casting this to date. This; despite max value of Timestamp_field showing <code>2016-09-20 12:31:38.000000</code>, doesn't return any record. Any idea why?</p>