title: Math operations on multiple tables
body: <p>I'm using PHP and I have the following two tables:</p>
  
  <pre><code>REVIEWS
  
  |  id  |  Item   | editor_rating | user_votes  |
  ------------------------------------------------
  |   1  | item_1  |      18.1     |      415    |
  |   2  | item_2  |      17.1     |      371    |
  |   3  | item_3  |      14.7     |      111    |
  
  |   8  | item_8  |      15.3     |      215    |
  |   9  | item_9  |      17.7     |      119    |
  |  10  | item_10 |      17.0     |      66     |
  
  
  FILTERS
  
  |  id  |  Item   |   published   |
  ----------------------------------
  |   1  | item_1  |       1       |
  |   2  | item_2  |       1       |
  |   3  | item_3  |       1       |
  
  |   8  | item_8  |       1       |
  |   9  | item_9  |       1       |
  |  10  | item_10 |       1       |
  </code></pre>
  
  <p>The following query works correctly and returns all the rows:</p>
  
  <pre><code>SELECT * FROM reviews AS r 
  JOIN filters AS f ON (r.id = f.id) 
  WHERE f.published = 1
  </code></pre>
  
  <p>So I'm on the right way.
  Now I would like to do some math operations on the records. For example <strong>sum</strong> the fields <strong>editor_rating</strong> and <strong>user_votes</strong> and list the rows ordered by DESC. I tried the following but it returns <strong>uncorrect</strong> results (not MySQL error, a sum error):</p>
  
  <pre><code> SELECT *, r.editor_rating+r.user_votes AS total FROM reviews AS r 
   JOIN filters AS f ON (r.id = f.id) 
   WHERE f.published = 1 ORDER BY total DESC
  </code></pre>
  
  <p>The tables above contains the actual dB data. By summing <strong>editor_rating</strong> and <strong>user_votes</strong> I should have a list ordered as follows:</p>
  
  <pre><code>18.1 + 415 = 433.1 = Item_1
  17.1 + 371 = 388.1 = Item_2
  15.3 + 215 = 230.3 = Item_8
  </code></pre>
  
  <p>instead I get the following list:</p>
  
  <pre><code>Item_8
  Item_9
  Item_10
  </code></pre>