Christian: ERROR 1140

Beitrag lesen

Nabend,

ich habe eine Datenbank mit verschiedenen Tabellen. Dort soll ich das Maximum der Spalte "UESatz" herausfinden. Das habe ich mit:
SELECT Name, MAX(UESatz) AS "max UESatz" FROM t_dozent;
erreicht.

Meine MySQL-Version ist: mysql  Ver 14.14 Distrib 5.1.30, for Win32 (ia32)
Ich verwende XAMPP.

Exakt derselbe Query funktioniert aber bei einem Freund nicht. Er hat eine andere MySQL-Version (mysql  Ver 14.12 Distrib 5.0.24a, for Win32 (ia32)), die bei ihm in der Schule verwendet wird. Ihm wird bei gleichen Query die Fehlermeldung:

[root@localhost:3306] ERROR 1140: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

Ich habe dann einmal gesucht und auf der MySQL-Webseite etwas gefunden: http://dev.mysql.com/doc/refman/5.1/en/counting-rows.html
Dort gibt es ein Beispiel:

Note the use of GROUP BY to group all records for each owner. Without it, all you get is an error message:

mysql> SELECT owner, COUNT(*) FROM pet;

ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...)
with no GROUP columns is illegal if there is no GROUP BY clause

Doch ironischerweise funktioniert dieser Query bei mir auch ohne Probleme, obwohl ich doch MySQL 5.1 habe...  
  
Was stimmt da nicht?  
  
  
  
Danke,  
  
Gruß  
Christian