<<< Movies without castings >>>
Scenario Movies
b2b9231b6443a0aa5631c90be81fc38491833122132db85f5699b268df22e189
See details on the model
In this scenario, we have three tables representing movies and the actors appearing in movies.
The table person contains the list of people who are actors or directors in movies; this table has 2 attributes:
- id a unique identifier for this person
- name the name of that person
The table movie that has 6 attributes:
- id a unique identifier for the movie
- title the name of the movie
- yr the year the movie was released
- director an integer (referring to the id of someone in the person table)
- budget the budget of the movie (in dollars)
- gross the amount of money generated by the movie (in dollars)
The table casting describes which actor playing in which movie and has 3 attributes:
- actorid, an integer referring to a person (who played in the movie)
- movieid, an integer referring to a movie (in which movie the actor played in)
- ord, an integer that describes the importance of the character the actor plays in the movie (1 means main character, 2 is the second role, etc.).
Question
What are the names of movies that do not have castings? Return the first ten in alphabetical order of title
Where not exists
For this query you can use the condition NOT EXISTS (QUERY) where QUERY is a SQL query and the condition will be true if there are not match for this query. Note that, just like previous subqueries examples in the WHERE, the subqueries QUERY can refer to tuples of the outter query.
{"rows":[["A Boy Named Sue"],["Andanggaman"],["Anvil! The Story of Anvil"],["Arctic Tale"],["Bauerntanz zweier Kinder"],["Black Chicks Talking"],["Callas Forever"],["Capitalism: A Love Story"],["Chirusoku no natsu"],["Crude"]],"fields":[{"name":"title","dataTypeID":1043}],"affectedRows":0}
True
False