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

No AS requirements for nested SELECT queries #1129

Closed
1 of 2 tasks
xzdandy opened this issue Sep 15, 2023 · 2 comments
Closed
1 of 2 tasks

No AS requirements for nested SELECT queries #1129

xzdandy opened this issue Sep 15, 2023 · 2 comments
Assignees
Labels
Feature Request ✨ New feature or request
Milestone

Comments

@xzdandy
Copy link
Collaborator

xzdandy commented Sep 15, 2023

Search before asking

  • I have searched the EvaDB issues and found no similar feature requests.

Description

Right now for nested SELECT queries, the rename AS is required in the query. For example,

SELECT price FROM (SELECT price FROM home_sales) AS T;

The following query will not work:

SELECT price FROM (SELECT price FROM home_sales);

We'd like to add the support for nested SELECT queries without AS to simplify the queries that user wrote.

Use case

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@xzdandy xzdandy added the Feature Request ✨ New feature or request label Sep 15, 2023
@gaurav274 gaurav274 self-assigned this Sep 16, 2023
@gaurav274 gaurav274 added this to the v0.3.5 milestone Sep 16, 2023
@gaurav274
Copy link
Member

gaurav274 commented Sep 16, 2023

https://www.postgresql.org/docs/7.3/queries-table-expressions.html#QUERIES-SUBQUERIES - PostgreSQL has a similar behavior. We can skip it.

I can make the AS keyword optional, but it makes it easier if we specify the alias_name.

@xzdandy
Copy link
Collaborator Author

xzdandy commented Sep 16, 2023

Sounds good. Let's keep it consistent with PostgreSQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request ✨ New feature or request
Projects
Development

No branches or pull requests

2 participants