Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DISTINCT to GROUP BY #1069

Open
JoshInnis opened this issue Dec 18, 2023 · 0 comments
Open

Add DISTINCT to GROUP BY #1069

JoshInnis opened this issue Dec 18, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request Functionality

Comments

@JoshInnis
Copy link
Contributor

If these duplicates are undesirable, they can be removed using the DISTINCT clause directly on the GROUP BY. Therefore:

GROUP BY DISTINCT ROLLUP (a, b), ROLLUP (a, c)

is equivalent to

GROUP BY GROUPING SETS (
    (a, b, c),
    (a, b),
    (a, c),
    (a),
    ()
)
@JoshInnis JoshInnis converted this from a draft issue Dec 18, 2023
@JoshInnis JoshInnis self-assigned this Dec 18, 2023
@JoshInnis JoshInnis added enhancement New feature or request Functionality labels Dec 18, 2023
@JoshInnis JoshInnis added this to the Clause Improvements milestone Dec 18, 2023
@JoshInnis JoshInnis removed this from the Clause Improvements milestone May 22, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in The Great Grouping Refactor May 22, 2024
@JoshInnis JoshInnis reopened this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Functionality
Projects
No open projects
Status: ✅ Done
Development

No branches or pull requests

1 participant