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

sql: subquery with MAX doesn't work #4672

Closed
RaduBerinde opened this issue Feb 25, 2016 · 1 comment
Closed

sql: subquery with MAX doesn't work #4672

RaduBerinde opened this issue Feb 25, 2016 · 1 comment
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@RaduBerinde
Copy link
Member

@knz hit this issue:
select * from t where a = (select max(a) from t) returns pq: aggregate functions are not allowed in WHERE

I believe it is just a faulty check in groupBy, where we check n.Where which is the expression before subqueries were expanded.

@RaduBerinde RaduBerinde added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Feb 25, 2016
@RaduBerinde RaduBerinde self-assigned this Feb 25, 2016
@knz
Copy link
Contributor

knz commented Feb 25, 2016

While looking at #4036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

2 participants