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

Incorrect query in dev #70

Open
ReinierKoops opened this issue Jul 8, 2021 · 2 comments
Open

Incorrect query in dev #70

ReinierKoops opened this issue Jul 8, 2021 · 2 comments

Comments

@ReinierKoops
Copy link

The dev-query (line 484, 485):
"SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3"
generates the wrong output, which is related to the question:
"What are the names and ranks of the three youngest winners across all matches?"

To make the query match with the question the SQL should be:
SELECT winner_name, winner_rank FROM matches GROUP BY winner_name ORDER BY winner_age LIMIT 3

@ReinierKoops
Copy link
Author

Another query:

"SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )"

This is a select statement that retrieves the oldest dog; While the dev.JSON in NL describes it as the youngest dog.

@ReinierKoops
Copy link
Author

ReinierKoops commented Sep 10, 2021

tables.json:

baseball_1:

  • has no primary key's defined.

This file contains a list of all tables and if they have a primary key (or not), I would guess that for some of these tables, which have no primary key this should not be the case.
p1_table_attributes.csv

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

1 participant