Hot answers tagged

1

I also completed pset7 recently. You can easily make this query by joining the two tables using the JOIN and ON keywords and with the id as the primary key. The code should be as follows. SELECT title, rating FROM movies JOIN ratings ON id = movie_id WHERE year = 2010 ORDER BY rating DESC, title ASC As for your method, I'm a beginner in SQL and I didn't even ...


1

I just recently solved this PSET, so I'm no expert, so I'm going to try and explain what is different about what I did in comparison to what you have (meaning I can't answer the three questions you asked directly). The biggest difference between mine and yours is that I joined the tables, which was important so that I could access the titles and ratings &...


1

Just check your database. I guess the data has been imported 4 times because of which each name has been printed 4 times. There is no real problem with any of your code. Hope this helps you. If it does then please check the tickmark.


1

This with open("characters.csv", "r") is a problem. Why take an argument and not use it? Don't hard code the file name.


Only top voted, non community-wiki answers of a minimum length are eligible