jetstreamapp / soql-parser-js

Javascript SOQL parser
https://jetstreamapp.github.io/soql-parser-js/
MIT License
79 stars 20 forks source link

Functions in order by are not composed correctly #104

Closed paustint closed 4 years ago

paustint commented 4 years ago

Description

If ASC or DESC is included in an order by that uses a function, then the query is not composed properly.

-SELECT ProductCode FROM Product2 GROUP BY ProductCode HAVING COUNT(Id) > 1 ORDER BY COUNT(Id)DESC
+SELECT ProductCode FROM Product2 GROUP BY ProductCode HAVING COUNT(Id) > 1 ORDER BY COUNT(Id) DESC