title: MYSQL SUM() returning top 10 values
body: <p>I am trying to find the SUM of 7 numeric fields to find the total, COMBINED with an output to display a LIMIT of 10 results ORDER BY total of each SUM.</p>
  
  <p>Here is my SUM code, which works on its own, but I am unsure how to use the two queries together, keep getting syntax errors.</p>
  
  <pre><code>SUM(comfort + service + ambience + friendliness + spacious + experience + toilets)/(7)/COUNT(shop_id) AS total FROM ratings GROUP BY shop_id
  </code></pre>
  
  <p>This is my SQL query to return data normally:</p>
  
  <pre><code>SELECT * FROM pubs, services, ratings
  WHERE pubs.shop_id=services.shop_id AND pubs.shop_id=ratings.shop_id
  GROUP BY shop_name
  ORDER BY shop_name ASC
  </code></pre>
  
  <p>I do not have the total of the 7 values stored in my database, I am using the above SUM query to find the total.     Thanks</p>