sequelize/sequelize — pull request #585 by mekanics (2013-05-02 22:00:27+00:00)
Title: 'ORDER BY' should come after 'GROUP BY'

otherwise it generate an error like this one:

{ [Error: syntax error at or near "GROUP"]
severity: 'ERROR',
code: '42601',
position: '558',
file: 'scan.l',
line: '1001',
routine: 'scanner_yyerror' }