0

I have been banging my head on this for an hour and half. Finally finished the pset, uploaded it. Check 50 says:

enter image description here

Now, both cs50 ide and DB browser return the correct results, and number of lines for both of these SQL's. Attached is the code:

Hopefully someone can help, otherwise Ill just take the hit on my marks. Its just not making any sense why this wouldnt work.

SELECT name FROM people WHERE id IN 
(SELECT person_id FROM stars WHERE movie_id IN
(SELECT movie_id FROM stars WHERE person_id = 102))
EXCEPT SELECT name FROM people WHERE name = "Kevin Bacon";

102 is kevin bacons person_id which I hardcoded, but is no different that hard coding the name Kevin bacon.

This is the pset https://cs50.harvard.edu/x/2020/psets/7/movies/

Thanks for any help.

0

102 is kevin bacons person_id which I hardcoded, but is no different that hard coding the name Kevin bacon.

Hard coding the id is, in fact, different than hardcoding the name. 102 is the id for Kevin Bacon on the distro database. What is the id for Kevin Bacon on the database that check50 uses? Since you cannot know that, best not to hard code it.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .