ralph: MYSQL Group-Funktion

hi,
ich hab folgendes sql-query:
SELECT COUNT(*), handle FROM log GROUP BY handle;

welches folgenedes Resultat liefert:

COUNT(*) handle
1  Anime
43  bada
77  BadHabitMarco
18  bierman
3  blanchard
24  BloodyKing
6  BloodyQueen
7  BornToLose
2  ChessYogin
19  Danby
2  DivineRecursion
6  DustinK
222  encarnacao
51  Erfan19md
25  ernestoe
1  Fegary
13  friedhelm
16  g-lew
44  Geeloo
1  Geochess
4  Gm-Lievanov
15  HomerJ
20  IceBox
24  Jamesir
20  Jeffk82
22  jinja
22  lievanov
53  llcoolj
38  Lordnuff
23  MagnusFaldt
8  MagnusJonson
43  mp3
31  Mulaku
53  OdinSon
116  Peski
6  Phillbobby
17  phm
10  pinemtn
150  pro-romania
3  procell
76  RP3
93  Rudibomben
50  schroeder
41  secretsofchess
10  SirVLCIV
1  SR71Blackbird
3  Strider
20  SwE-dv
1  TheGreatDane
5  Tigo
21  TRADE
24  Tulosba
28  Udjat
209  unreal
3  vagabond
24  Volkan
128  WarEagle
2  WarHawk
3  wasteoftime

nun möchte ich das resultat nach count(*) absteigend sortiert haben.

SELECT COUNT(*), handle FROM log GROUP BY handle ORDER BY COUNT(*);
funktioniert leider nicht. liefert "Invalid use of group function" als fehlermeldung. hat jemand eine idee? besten dank. gruss ralph:)

  1. Huhu ralph

    versuch es mal so

    SELECT COUNT(*) AS Anzahl, handle FROM log GROUP BY handle ORDER BY Anzahl;

    Viele Grüße

    lulu

    --
    bythewaythewebsuxgoofflineandenjoytheday
    1. Vielen Dank lulu.
      Klappt wunderbar :-)