Bug #6652 | SUM does not return correct values unless the field is aliased | ||
---|---|---|---|
Submitted: | 16 Nov 2004 2:16 | Modified: | 16 Nov 2004 12:30 |
Reporter: | Timothy Crider | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S1 (Critical) |
Version: | 5.0.1-alpha | OS: | Linux (Fedora Core 2) |
Assigned to: | CPU Architecture: | Any |
[16 Nov 2004 2:16]
Timothy Crider
[16 Nov 2004 10:47]
Tobias Asplund
This is not a bug, you're just sorting on different things. The first case you sort on the summed up number which is now called kills. In the second case you sort on the column kills, so in effect you get back the sum of the 5 rows with the most kills, you're not ordering by the sum there.