title: SQL Count number of true values from a row then multiply with another column
body: <p>I am trying to count the number of true values from a row, and so far it's looking good. After I get the value I would like to multiply that with the value from column 'Amount' in the same row.</p>
  
  <p>Table <em>test</em> look like this, type of LA and MD are tinyint (checkbox)</p>
  
  <pre><code>ID   |  Amount |   LA   |   MD
  ------------------------------------
  1    |    7    |   1    |   0
  2    |    2    |   1    |   1
  </code></pre>
  
  <p>So far I can count true values from table <em>test</em> using:</p>
  
  <pre><code>SELECT count(*)
  FROM test
  WHERE LA = true
  </code></pre>
  
  <p>But ones I start implementing the multiplication it gets messy, not yet that steady on the syntax. Any tips would be greatly appreciated.</p>