When executing the original program in a new mysql environment, a syntax error is prompted. After checking, it is found that the mysql version of the environment is mysql8. The word groups has become a reserved keyword since mysql8.0.2. It is temporarily replaced by `groups`. It should still be used in the future. Be careful to avoid this kind of pitfalls.
You have an error in your SQL syntax...
Official documentation: https://dev.mysql.com/doc/refman/8.0/en/keywords.html