title: How to date_trunc by custom trimester in PostgreSQL?
body: <p>I'm working on a project where the fiscal year is measured by trimesters, and for as odd as it sounds every trimester is measured from the 10th day of the month instead of the 1st due to country regulations. So the first trimester is considered to start on Jan 10th and ends three months after on the 9th of that month. Is there a way to <code>date_trunc</code> or simply group a timestamp column using these custom trimesters in PostgreSQL? </p>
  
  <p>So far I've only been able to query the data by month/day/week with something like: </p>
  
  <p><code>FROM myTable SELECT(
   SUM(price) as total,
   date_trunc('month', 'timpestamp')
  )
  GROUP BY (total)
  </code></p>