Skip to content

Group by Alias #215

@jychen7

Description

@jychen7

Describe the bug
#110 suggests we can group by alias, however, I modify the existing test case select_simple_aggregate_with_groupby_with_aliases a bit, then it fails

To Reproduce

SELECT state AS a, MIN(age) AS b FROM person GROUP BY state

shows correct answer

SELECT state AS a, MIN(age) AS b FROM person GROUP BY a

raises error Plan("Projection references non-aggregate values")

Expected behavior

SELECT state AS a, MIN(age) AS b FROM person GROUP BY state

SELECT state AS a, MIN(age) AS b FROM person GROUP BY a

returns same answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions