title: Simple SELECT query problem
body: <p>I have this MySql select query which seems to have a bug but I am quite "green" so I simply cannot see, so maybe you could help?<br/>
  <br/>
  Here is the query:<br/></p>
  
  <pre><code>SELECT node_id 
    FROM rate 
   WHERE node_id='".$cat_node_id_string."' 
   LIMIT ".$node_count_star.",".$node_count_end."    
   ORDER BY SUM(amount) 
   GROUP BY node_id
  </code></pre>
  
  <p>Thanks for help in advance...</p>
  
  <p>UPDATE: <br/>
  I will post a mysql error to make it clearer...</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax;
    check the manual that corresponds to
    your MySQL server version for the
    right syntax to use near 'GROUP BY
    node_id LIMIT 1,20' at line 5</p>
  </blockquote>