title: sql question regarding sum() and tax (MySQL 5.0.89)
body: <pre><code>Select 
  id,
  sum(amount), 
  vat 
  From transactions WHERE id=1; 
  </code></pre>
  
  <p>Each record in this table has a vat percentage, I need to get the total amount in all records, however each amount has to be multiplied by its vat %. </p>
  
  <p>Is there away to do this without looping through all records?</p>