Skip to content

Commit

Permalink
add grouping() function
Browse files Browse the repository at this point in the history
  • Loading branch information
kitta65 committed Dec 29, 2023
1 parent 7ec9bbf commit 49f54af
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,20 @@ FROM UNNEST([1, 2]) AS i`,
example: `SELECT
LOGICAL_AND(b) -- false
FROM UNNEST([true, false]) AS b`,
},
{
ident: "GROUPING",
example: `/**
* one, two, one_agg
* 1, , 0
* , 2, 1
*/
SELECT
one,
two,
GROUPING(one) one_agg,
FROM (SELECT 1 AS one, 2 AS two)
GROUP BY GROUPING SETS (one, two)`,
},
{
ident: "LOGICAL_OR",
Expand Down

1 comment on commit 49f54af

@kitta65
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.