Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

MYSQL SUM GROUP BY


GROUP BY deve vir antes de ORDER BY:
  SELECT SUM(g.points) 
    FROM GRADES g
   WHERE g.date < 'thedate' 
GROUP BY g.assignmentid
ORDER BY g.date DESC