romy: max Wert MySQL

Beitrag lesen

Hi norbert,

group by ist das Stichwort.
Syntaxbeschreibungen findest Du hier: http://www.mysql.com/doc/en/GROUP-BY-Functions.html

<zitat>
MAX(expr)
Returns the minimum or maximum value of expr. MIN() and MAX() may take a string argument; in such cases they return the minimum or maximum string value. See section 7.4.5 How MySQL Uses Indexes.
mysql> SELECT student_name, MIN(test_score), MAX(test_score)
    ->        FROM student
    ->        GROUP BY student_name;

</zitat>
ciao
romy