MYSQL – Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
You may expect that case (upper vs. lower) would be handled consistently across aggregate functions in MySQL. You would be wrong. If you see this post before you found out the hard way, then you can find out the easy way. Yippie !!
| SELECT name, weight FROM widget | name | weight |
| foobar | 4 | |
| Foobar | 10 |
| SELECT name, SUM(weight) | name | SUM(weight) |
| FROM widget GROUP BY name | oobar | 14 |
| SELECT name, COUNT(*) RowCount | name | COUNT(*) |
| FROM widget GROUP BY name | oobar | 2 |
huh ?