dies möglich ist, in mysql aus folgendem Grund
MySQL extends the standard SQL use of GROUP BY so that the select list can refer to nonaggregated columns not named in the GROUP BY clause. This means that the preceding query is legal in MySQL. You can use this feature to get better performance by avoiding unnecessary column sorting and grouping. However, this is useful primarily when all values in each nonaggregated column not named in the GROUP BY are the same for each group. The server is free to choose any value from each group, so unless they are the same, the values chosen are indeterminate. Furthermore, the selection of values from each group cannot be influenced by adding an ORDER BY clause. Result set sorting occurs after values have been chosen, and ORDER BY does not affect which values within each group the server chooses.
haben einen Blick auf die Dokumentation in diesem Link https://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html
Andere DBMS die Auswahl nach so nicht erweitern die Standard-SQL Verwendung von GROUP können Sie Liste in anderen DBMS kann nur auf aggregierte Spalten
dh in anderen DBMS diese Abfrage
0 siehe
haben in diesem, das hilft
SELECT COUNT(*) Anzahl, PID, postID
FROM PersonLikesPost
GROUP BY Anzahl, PID, postID
Hoffnung übersetzt werden.
Es funktioniert in MySQL, weil es standardmäßig nach inkohärenten Ergebnissen fragt. Korrigieren Sie die Abfrage und es funktioniert in jedem DBMS. –