title: How do I use multiple filters in a group by in postgres?
body: <p>Looking to create a reporting table that groups by date, but sums on several different filters.</p>
  
  <p>Example, say I have multiple locations of a business and want to sum sales grouped by date.</p>
  
  <p>So say source table</p>
  
  <pre><code>Date  |  Location  | Amount
  ===========================
  Mon   |   One      | 10
  Mon   |   Two      | 15
  Mon   |   One      | 12
  Tue   |   One      | 13
  Tue   |   Three    | 17
  </code></pre>
  
  <p>I'd like to transform this into</p>
  
  <pre><code>Date  |  Location One Sales | Location Two Sales
  ================================================
  Mon   |   22                | 15
  Tue   |   13                | 0
  </code></pre>
  
  <p>Racking my brains on this right now and running into a wall.</p>
  
  <p>Thanks!</p>