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

We cannnot use aliased column in group by clause #744

Open
psvri opened this issue Jan 19, 2025 · 2 comments
Open

We cannnot use aliased column in group by clause #744

psvri opened this issue Jan 19, 2025 · 2 comments

Comments

@psvri
Copy link
Contributor

psvri commented Jan 19, 2025

When I tried to use the aliased column in group by , limbo returns a parser error, but it works fine in sqlite3 as shown below.

Sqlite3 output

SQLite version 3.48.0
sqlite> create table temp (t1 integer, t2 integer);
sqlite> insert into temp values (1, 2), (1, 2), (3, 4);
sqlite>  select t1 as x, count(t1) from temp group by x;
1|2
3|1

Limbo output

limbo> create table temp (t1 integer, t2 integer);
limbo> insert into temp values (1, 2), (1, 2), (3, 4);
limbo> select t1 as x, count(t1) from temp group by x;

  × Parse error: Column x not found

@LtdJorge
Copy link
Contributor

I think this got duplicated at #745

@psvri
Copy link
Contributor Author

psvri commented Jan 19, 2025

I think this got duplicated at #745

My bad, I could have grouped both of them in one only.

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

2 participants