-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #205: support within group and filter keywords
- Loading branch information
Showing
6 changed files
with
42 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
select | ||
ARRAY_AGG(DISTINCT foobar.my_special_foo) WITHIN GROUP (ORDER BY foobar.another_foo) AS a_very_long_alias, | ||
ARRAY_AGG(DISTINCT foobar.my_special_foo || foobar.another_very_long_foo) WITHIN GROUP (ORDER BY foobar.another_foo desc) AS a_very_long_alias, | ||
ARRAY_AGG(DISTINCT foobar.my_special_foo) WITHIN GROUP (ORDER BY foobar.another_foo) FILTER (WHERE barbar = "bazbaz" and bazbaz = "quxqux") AS something_else, | ||
ARRAY_AGG(DISTINCT foobar.my_special_foo) WITHIN GROUP (ORDER BY foobar.another_foo) FILTER (WHERE barbar = "bazbaz" and bazbaz = "quxqux" and something_else_quite_long = "a long literal") AS something_else | ||
from my_table as foobar | ||
)))))__SQLFMT_OUTPUT__((((( | ||
select | ||
array_agg(distinct foobar.my_special_foo) within group ( | ||
order by foobar.another_foo | ||
) as a_very_long_alias, | ||
array_agg( | ||
distinct foobar.my_special_foo || foobar.another_very_long_foo | ||
) within group (order by foobar.another_foo desc) as a_very_long_alias, | ||
array_agg(distinct foobar.my_special_foo) within group ( | ||
order by foobar.another_foo | ||
) filter (where barbar = "bazbaz" and bazbaz = "quxqux") as something_else, | ||
array_agg(distinct foobar.my_special_foo) within group ( | ||
order by foobar.another_foo | ||
) filter ( | ||
where | ||
barbar = "bazbaz" | ||
and bazbaz = "quxqux" | ||
and something_else_quite_long = "a long literal" | ||
) as something_else | ||
from my_table as foobar |
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