1
SELECT *, count(spieler) as 'Anzahl'
FROM spieler, teilnehmer, durchfuehrung
WHERE spieler.id = teilnehmer.spieler and teilnehmer.istErschienen = 1 and teilnehmer.durchfuehrung = durchfuehrung.id and durchfuehrung.wurdeUeberprueft = 1
GROUP BY teilnehmer.spieler
ORDER BY 'Anzahl' DESC;
ORDER BY就是這樣沒用......請幫我解決這個MySQL查詢,以便別名Anzahl IST有序遞減....排序依據什麼也沒有發生的mysql
[當使用單引號,雙引號,反引號和在MySQL(http://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – fancyPants
不要使用'SELECT * ... GROUP BY x' - '*'中的值將是_unpredictable_。 –