-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate HAVING without GROUP BY to "GROUP BY 1 HAVING"
The previous method of translating ungrouped HAVING to "AND" had some problems: 1. If no WHERE was in the query, the query would fail with: `near "AND": syntax error` 2. When an aggregate function was used in having (e.g, COUNT(*) > 1), the query would fail with: `misuse of aggregate function COUNT()` This commit fixes both of these issues.
- Loading branch information
Showing
2 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters