Skip to content

Implicit usage of GROUP BY projections for Select Distinct #86925

@allegrinisante

Description

@allegrinisante

Company or project name

No response

Use case

Select distinct queries can only leverage a group by projection by explicitly defining the group by.
example: https://fiddle.clickhouse.com/71b7cd0f-f8c7-4cd6-af23-bb83f57f4b5a

Describe the solution you'd like

In case the distinct columns are a subset of the projection group by keys, it should be possible to use the projection without explicitly aggregating the results.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions