Questions tagged [movies]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

PSET7 Movies - SQL.13 , how come I have to use the same JOIN lines again? Aren't the tables already joined?

SELECT name FROM people JOIN stars ON stars.person_id = people.id JOIN movies on stars.movie_id = movies.id WHERE movies.id = (SELECT movies.id WHERE stars.person_id = (SELECT id FROM people WHERE ...
user avatar
0 votes
0 answers
21 views

What's wrong in this query?

Why this query outputs just 61 rows instead of more than 185? I 'm trying to do 13.sql SELECT name FROM people WHERE id = (SELECT person_id FROM STARS JOIN people ON people.id = stars.person_id WHERE ...
user avatar
0 votes
2 answers
2k views

pset7 movies sql7

I'm doing the pset8 tasks. Currently, I have some issues with sql7. In 7.sql, write a SQL query to list all movies released in 2010 and their ratings, in descending order by rating. For movies with ...
user avatar
0 votes
2 answers
143 views

How can I check my number of rows on pset7 movies?

I wanted to check my queries one by one as I am doing them, my 1.sql works fine but how I find out how many rows I am getting?
user avatar
1 vote
1 answer
101 views

Submit50 for pset7 movies loads SQL files but returns "Error when executing query: missing statement"

When I execute: submit50 cs50/problems/2020/x/movies All my SQL files are sent for grading and all come back with the same error: Error when executing query: missing statement I have tried the sql ...
user avatar
0 votes
1 answer
101 views

How to exclude 'Kevin Bacon's' name from query table?

i have tried to exclude the name from the list but most of the solution aren't doing anything. anyone have idea how to solve. SELECT name FROM movies JOIN stars ON movies.id=stars.movie_id JOIN ...
user avatar
0 votes
1 answer
250 views

Pset7 (Movies) 12.sql: Table outputs 96 rows rather than 5 rows

I've been stuck on this for quite some time and did a lot of research on the AND operator in SQL, but no matter how many variations I try I cannot get my table to output just 6 rows, with each row ...
user avatar
0 votes
1 answer
128 views

Pset7 Movies Q12: I don't get what's wrong

I can't figure out why my pset7 movies Q12 code isn't working. Can anyone tell me why? Here is my code: SELECT DISTINCT title FROM movies, stars, people WHERE movie_id IN (SELECT movie_id FROM stars ...
user avatar
  • 1
0 votes
1 answer
334 views

pset7 Q7: How many actors are named "Meryl"?

I am at a complete loss for something that should be very simple to find in SQLite. In the IMDB database, I have to find how many actors have the name 'Meryl', I have tried select name, count(name) ...
user avatar
0 votes
1 answer
315 views

PSET7 Movies Q8 - Why these queries return different results?

I'm working on pset7 movies problem of the CS50 course and I have a question regarding 8.sql, which asks to write a SQL query to list the names of all people who starred in Toy Story. To my ...
user avatar
  • 3
0 votes
1 answer
571 views

pset7/movies/13.sql: exclude Kevin Bacon from the resulting list

In pset7/movies, I want to dynamically exclude Kevin Bacon from the resulting list (e.g. not specifically mentioning his name with NOT or EXCEPT or copying and pasting code that calculates his ID, so ...
user avatar
0 votes
1 answer
1k views

Pset7 8.sql is not giving output

i am in problem set 7 now, and i'm stuck in '8.sql'. Specifications is to write a SQL query to list the names of all people who starred in Toy Story. When i run my code, i get no output, i have ...
user avatar
0 votes
1 answer
503 views

pset7 3.sql wrong number of rows

when writing a query to produce a table that lists the titles of all movies with a release date on or after 2018, in alphabetical order I produce a table with 35,755 rows. The CS50 pset states that I ...
user avatar
1 vote
2 answers
4k views

PSET7 Movies Q9: Why is my number of rows generated different from what the assignment requires?

Here are the parameters for running a SQL query in the file 9.sql: In 9.sql, write a SQL query to list the names of all people who starred in a movie released in 2004, ordered by birth year. ...
user avatar
2 votes
3 answers
3k views

pset7 movies Q12

I'm stuck in PSET7 SQL part 1 question 12: I want to list all movies with 2 people inside. The JOIN of the 3 table is set, the problem is in my WHERE statement: WHERE people.name = 'Johnny Depp' ...
user avatar
  • 53