title: Sum of column depending on values of another column
body: <p>I was wondering how can I make a query that outputs the sum of a column "B" based on the values of column "A".</p>
  
  <p>Example table:</p>
  
  <pre><code>A B
  1 2
  1 6
  2 3
  3 1
  2 9
  3 7
  </code></pre>
  
  <p>Desired query output:</p>
  
  <pre><code>A B
  1 8
  2 12
  3 8
  </code></pre>