0
How I do a query in mysql GROUP BY listing the rows and returning me a sum of a column x
Example
 DB   | id |  nome |  nota  |
      | 01 | Fabio |`  10   |
      | 02 | Fabio |   20   |
      | 03 | Leo   |   25   |
      | 04 | Leo   |   25   |
     $sql = "SELECT * FROM ps GROUP BY nome";
     $resultado = mysql_query($sql) or die ("Erro na consulta");
     while ($linha2 = mysql_fetch_assoc($resultado)) {
     echo $id = $linha2["id_tec"];
     echo $nome = $linha2["name"];
     echo $nota = $linha2["nota"]; // notas ja somadas
     }
     Resultado Desejado
     01 Fabio 20
     02 Lep   50
You really need that first id?
– iuridiniz
Hello is not necessary
– Fabio Henrique