When I read an article about SQL puzzles-36: dual responsibility, I downloaded the second version of SQL puzzles. By default, the group by processing between SQL server and mysql is different. In SQL server, the field in the select list is either a field in the group by field group or a max/min/sum/constant. Mysql supports fields not in group.
For example, select name, max (registerdate) as registerdate from registration group by name having count (0) = 1; is written in SQL server, and can be written in mysql: select name, registerdate as registerdate from registration group by name having count (0) = 1; // indicates obtaining the user name and registration time that are registered only once, this statement cannot be run in SQL server, and an error is reported: Msg 8120, Level 16, State 1, Line 1.
In fact, in mysql can set SQL _mode: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
I don't know how to implement the select clause of group by. mysql provides different implementations than SQL server. Aren't they all based on sql92 standards? SQL server and mysql have different implementations in the select clause in group by. Obviously, mysql provides more flexibility.