Turn off SQL mode ONLY_FULL_GROUP_BY in MySQL 5.7