title: Group BY Subquery returns more than 1 row
body: <p>First im mysql noob :D
  Ive tried searching but nothing that can help.
  Im trying to update my database with this query.</p>
  
  <pre><code>UPDATE client SET cntr_limit=(SELECT fulltraffic from 
  (SELECT
      client.id,
      (SUM(ipacct.byteso)+SUM(ipacct.bytesi)) as fulltraffic
          FROM client 
              LEFT JOIN ips ON client.id = ips.cid
              LEFT JOIN ipacct ON ips.ip = ipacct.target
              WHERE ipacct.tag = 1
          GROUP BY client.id
       ) as x
  ) +322122547200 ;
  </code></pre>
  
  <p>Im getting Subquery returns more than 1 row. 
  I know the subquery cant have more than one row but i need to work with GROUP BY. If i remove GROUP BY query works but every client get the traffic calculated from all the ips,
  instead of traffic calculated differently for every id. </p>
  
  <p>If i use.</p>
  
  <pre><code> SELECT
      client.id,
      (SUM(ipacct.byteso)+SUM(ipacct.bytesi)) as fulltraffic
          FROM client 
              LEFT JOIN ips ON client.id = ips.cid
              LEFT JOIN ipacct ON ips.ip = ipacct.target
              WHERE ipacct.tag = 1
          GROUP BY client.id;
  </code></pre>
  
  <p>im getting </p>
  
  <pre><code>id  fulltraffic
  1   5100993724986
  3   410550845834
  4   790726628007
  5   204212941099
  6   440290245087
  8   587044969960
  </code></pre>
  
  <p>if i remove GROUP BY im getting</p>
  
  <pre><code>id  fulltraffic
  1   487196626849368
  </code></pre>
  
  <p>Thanks in advance.</p>