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

'Group by' combined with 'where' not working #89

Closed
hvt opened this issue Dec 3, 2013 · 0 comments
Closed

'Group by' combined with 'where' not working #89

hvt opened this issue Dec 3, 2013 · 0 comments

Comments

@hvt
Copy link

hvt commented Dec 3, 2013

Suppose I have the following serie:

a | b | c
---------
x | y | 10
x | y | 20
y | z | 30
x | z | 40

And now issue the following query:

select sum(c) from test group by b

Then I get the expected:

time | sum | b
--------------
tttt | 30  | y
tttt | 70  | z

Now I issue:

select sum(c) from test group by b where a == 'x'
or:
select sum(c) from test where a == 'x' group by b

I would expect:

time | sum | b
--------------
tttt | 30  | y
tttt | 40  | z

I do however get the following query error:

Invalid column name b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants