I have a simple application that does text substitution on literals in the WHERE clause of a SELECT statement. I run SqlParser.parseQuery() and apply .getWhere() to the result.
However, for the following query the root node is not an SqlSelect, but an SqlOrderBy:
select EventID, Subject
from WorkOrder
where OwnerID = 100 and Active = 1 and Type = 2
order by Subject
If we use "group by" instead of "order by" then the root is an SqlSelect as expected.
Is this the intended behaviour?