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

Check50 passes incorrect solution for 'movies' using distinct name instead of id #258

Open
chriscarrollsmith opened this issue Jul 13, 2024 · 0 comments
Assignees

Comments

@chriscarrollsmith
Copy link

Instructions for 'movies' include this line:

"Executing 9.sql results in a table with 1 column and 19,325 rows."

My initial, incorrect solution passed check50 even though it returned only 19,261 rows. (My error was in using DISTINCT on 'name' rather than 'id', which evidently excludes some distinct people who have identical names.)

Here's the incorrect solution that passed the check:

SELECT DISTINCT(name)) FROM people JOIN stars ON people.id = stars.person_id WHERE movie_id IN (SELECT id FROM movies WHERE year = 2004) ORDER BY birth;
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

4 participants