title: how to insert some formula in mysql?
body: <p>i want to calculating one row at table "counter". i try to make my table like:</p>
  
  <pre><code>name          black     yellow     white        qty_job      total
  david           1        0          0            2             ?
  andrew          0        1          1            4              ?
  </code></pre>
  
  <p>the formula to calculate is :</p>
  
  <pre><code>total = (nblack * 1) + (nyellow * 1) + (nwhite * 0.4) / qty_job
  total = (1 * 1) + (0 * 1) + (0 * 0.4) / 2 = 0.5
  </code></pre>
  
  <p>how to insert this formula at mysql code? especially at SELECT method.</p>