Skip to content

Subquery with select function #474

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

Open
abasile15 opened this issue Mar 25, 2025 · 1 comment
Open

Subquery with select function #474

abasile15 opened this issue Mar 25, 2025 · 1 comment

Comments

@abasile15
Copy link

Is your feature request related to a problem? Please describe.
When go-jet generates a subquery that returning a function like max(updateTime), the inner join condition assumes it's named as table.column.
After sometime, I found a simple solution where the alias has the table in the name.
i.e. SELECT(
MAX(table.MyTable.UpdateTime).AS("my_table".update_time"),

Describe the solution you'd like
Each 1st time user could save time if go-jet would take functions into account when generating the link conditions. This way we won't have to use an alias, and better yet prepend an unintuitive table name

@go-jet
Copy link
Owner

go-jet commented Mar 26, 2025

Could you give a complete example, I'm having a problem to follow.

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

No branches or pull requests

2 participants