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

The JOIN table part of the output SQL does not contain ON clauses. #8

Open
lanqil opened this issue Feb 24, 2021 · 4 comments
Open

Comments

@lanqil
Copy link

lanqil commented Feb 24, 2021

Hello,
I found the output sql does not contain ON clauses.
For example,
"question": "Show the stadium name and the number of concerts in each stadium."
"predicted": "SELECT stadium.Name, Count() FROM stadium JOIN concert GROUP BY stadium.Stadium_ID"
"gold": "SELECT T2.name , count(
) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id"
I want to know how to get the on clauses "ON T1.stadium_id = T2.stadium_id".
Thank you.

@awasthiabhijeet
Copy link

Hi @Impavidity @pnpnpn,
I am also facing the same issue.
Any suggestions to fix this problem?

@xkluan
Copy link

xkluan commented Aug 20, 2021

I'm also facing this issue now..... @Impavidity @pnpnpn Can you give us some help?

@Impavidity
Copy link
Contributor

You can get the ON clause by rules based on the structure of the database. For example, the concert table has a foreign key that connect to the primary key of stadium table. Then you can compose concert.stadium_id = stadium.stadium_id.

@surajjkumar
Copy link

Hey @Impavidity , I am facing the same issue.
How do I execute the solution you just suggested. Can you please elaborate a little.

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

5 participants