title: Sum + Pivot + Where calculation in SQL
body: <p>I'm new to SQL and tried searching for a post mappable to my own, but could not find one, so any advice would be really appreciated!</p>
  
  <p>I have a dataset that looks like this (but ~25 million rows):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ID Date Amount Type
  112233 12/1/2018 300 3
  112233 12/1/2018 80 3
  112233 12/1/2018 60 0
  112233 12/1/2018 40 3
  112233 12/1/2018 20 3
  112233 12/1/2018 40 3
  112233 12/1/2018 0 0
  112233 12/2/2018 120 3
  112233 12/2/2018 120 3
  112233 12/2/2018 120 0
  112233 12/2/2018 120 3
  112233 12/3/2018 120 3
  112233 12/3/2018 120 0
  112233 12/3/2018 120 0
  112233 12/3/2018 120 3
  112233 12/3/2018 120 3
  112233 12/3/2018 120 3
  112233 12/3/2018 120 3
  666600 12/1/2018 0 0
  666600 12/1/2018 0 0
  666600 12/1/2018 100 3
  666600 12/1/2018 400 3
  666600 12/1/2018 80 3
  666600 12/1/2018 40 3
  666600 12/1/2018 0 0
  666600 12/2/2018 80 3
  666600 12/2/2018 0 0
  666600 12/2/2018 80 3
  666600 12/2/2018 0 0
  666600 12/2/2018 500 0
  666600 12/2/2018 100 3
  666600 12/3/2018 400 3
  666600 12/3/2018 80 3
  666600 12/3/2018 40 3
  666600 12/3/2018 0 0
  666600 12/3/2018 80 3
  666600 12/4/2018 0 0
  666600 12/4/2018 80 3</code></pre>
  </div>
  </div>
  </p>
  
  <p>and I need it to look like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ID Amount Type
  112233 420 0
  112233 1,440 3
  666600 500 0
  666600 1,560 3</code></pre>
  </div>
  </div>
  </p>
  
  <p>In excel terms, what I want to do is: a SUMIFS function, summing 'Amount' by 'ID' (in this example 112233 and 666600) and by 'Type' (either 0 or 3).</p>
  
  <p>Is this doable in SQL? Thanks!</p>