Added a field to group by to avoid error with mysql strict mode
Merge pull request #1228 from csalvador/develop

Added a field to group by to avoid error with mysql strict mode